On Mon, 2006-17-04 at 19:40 +0530, Irfan J Sayed wrote:
> Hi,
> 
> 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
> 
> Regards
> Irfan Sayed
> 
>  

open FH, "cleartool lock vob:$_" or die "cannot open pipe from
cleartool: $!\n";
while( <FH> ){
  ...
}
close FH;

See `perldoc -f open` for details.


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to