use strict; use warnings; use IPC::Run3; use Data::Dumper; my @branched_paths; my $savefile='//depot/perl/files/scripts/file.c'; my $cmd = [ qw(p4 where $savefile) ]; #my $cmd = [ qw(p4 where //depot/perl/files/scripts/file.c) ]; #works #print "CMD:$cmd\n"; my ($stdin, $stdout, $stderr); run3($cmd, \$stdin, \$stdout, \$stderr); print $stderr; chomp($stderr); if ($stderr =~ /file\(s\) not in client view/) { #print "in"; push @branched_paths,"$savefile"; } print @branched_paths;