Dec 24, 2010, 2:01 PM
Post #1 of 2
Hi,I really need help here.I have been trying to save STDERR output of a p4 command for a while.I tried using "2>&1" and "open3" command but havent been successful.Can the perl gurus pls advise?Any help truly appreciated.
Saving STDERR of a perforce command to a variable
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 th
+is is present
my $child_exit_status = $? >> 8;
if ($err eq 'file(s) not in client view')