Irfan J Sayed wrote:
Hi,
Hello,
I am executing following command
foreach $_ (@vob_list)
{
system "cleartool lock vob:$_";
}
I want to catch the output of this system command in the file
can anybody please tell me that how can i achieve that
a) have the shell do it:
cleartool lockk vob:$_ > file
b) do backticks and put the reuslts in a file via open()
my @output = `cleartool lockk vob:$_`;
print $file_handle @output;
c) use open3 to have handles to in, out, err and put whatever you like
wherever you like using basic filehandles
perldoc IPC::Open3
HTH :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>