in reply to Redirect STDOUT to a $variable
and then postprocess what landed in the siphoned-off text file.prog.pl | tee trapit.txt
On Windows there is no tee, so you'd have to overload the print function with your own routine to print both to STDOUT and somewhere else.
Update: BUT if you can live with the output being completely redirected rather than just copied then...
works on Windows and *NIXprog.pl > trapit.txt
^M Free your mind!
|
---|