> -----Original Message----- > From: Lynn. Rickards [mailto:[EMAIL PROTECTED] > Sent: Monday, October 06, 2003 12:43 PM > To: 'George Gallen'; '[EMAIL PROTECTED]' > Subject: RE: Capturing the output of a sytem() command > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of > > Thomas, Mark - BLS CTR > > Sent: Monday, October 06, 2003 11:21 AM > > To: 'George Gallen'; [EMAIL PROTECTED] > > Subject: RE: Capturing the output of a sytem() command > > > > > > > Let me clarify ths slightly. > > > > > > I'm using backticks to run the command, so I can capture > the output. > > > But How do I read it sequentially, line by line. > > > > > > I'm converting a file from ASCII -> BASE64, and want to read the > > > converted file directly from the base64 conversion routine. > > > Something like: my $exe = $path/to/base64.exe; my $cmd = $exe . " required_args_to_read_file_and_send_output_to_stdout";
open CMD, "$cmd | "; foreach my $line(<CMD>) { print "LINE = " . $line; #do stuff } close(CMD); HTH - Lynn; _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs