Something like?:
my $pid = open my $out, 'theExe infile | tee outfile' or die $!; while( <$out> ) { processOutputLine( $_ ); }
You can omit the tee if you don't need a copy of the output in a file afterwards. Or you could just print a copy from within the while loop if you do.
In reply to Re^5: parsing the results of the subroutine in real time
by BrowserUk
in thread parsing the results of the subroutine in real time
by doar4forum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |