foreach my $file (@changed_files) { my $p4where_output=`p4 where $file 2>&1`; print "P4 where output:$p4where_output\n"; if($p4where_output =~ /file(s) not in client view/) { push @changed_paths,"$file\n"; }