On Mon, 2007-09-24 at 05:13 +0530, Somu wrote: > Thanks for the help. I did it using > > system "tasklist >> temp"; > > open FH , "temp" ; > statements.. > unlink ("temp"); #EOF
Consider this code snippet then, does this in one step. I am writing the output to a log only you can put all the logic into the loop. open( $process, '|-', $command ) or croak "Unable to create process $command, $!"; while( $line = <$process> ) { print $log $line; } close( $process ); -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/