#!/usr/bin/perl -w use strict; use warnings; use diagnostics; #use diagnostics; use IPC::Open3; my @changed_paths; my @changed_files=("//depot/perl/tools/scripts/files/data.c"); foreach my $file (@changed_files) { my($wtr, $rdr, $err); use Symbol 'gensym'; $err = gensym; my $pid = open3($wtr, $rdr, $err,'p4 where $file'); print "$err\n"; #prints as GLOB(0x183f108),why is it so? #waitpid( $pid, 0 ); //Why do we need this?Program never halts if this is present my $child_exit_status = $? >> 8; if ($err eq 'file(s) not in client view') { push @changed_paths,$file; } print @changed_paths; }