Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Redirect STDOUT to a $variableby Moron (Curate) |
on Aug 10, 2007 at 11:53 UTC ( [id://631770]=note: print w/replies, xml ) | Need Help?? |
It's not abundantly clear what is wanted although taking your first statement in isolation, I would deduce (tentatively!) that (on *NIX) you'd want something like:
and then postprocess what landed in the siphoned-off text file. 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 *NIX
__________________________________________________________________________________
^M Free your mind!
In Section
Seekers of Perl Wisdom
|
|