#!/usr/bin/env perl -w use strict; my $p4 = "p4 -ztag"; my $command = "branches"; my @branches = `$p4 $command`; foreach (@branches) { chomp; if(/^\.\.\.\s(branch)(.*)$/) { print "$1: $2\n"; } if(/^\.\.\.\s(Access)(.*)$/) { my $localtime = localtime($2); print "$1: $localtime\n"; } }