Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Answer: Redirecting all output to a var for post processing?

by goldclaw (Scribe)
on Feb 14, 2001 at 01:06 UTC ( #58234=categorized answer: print w/replies, xml ) Need Help??

Q&A > input and output > Redirecting all output to a var for post processing? - Answer contributed by goldclaw

If collecting all output in the same variable is OK for you, then using Tie::STDERR would do the job:
use vars qw($OUTPUT); use Tie::STDERR \$OUTPUT; *STDOUT=\*STDERR;
You might want to save the value of STDOUT if you would like to print something after you are done filtering etc.

goldclaw

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[jedikaiti]: "finished" 18?
[Discipulus]: yes you know.. happy birthday.. happy birthday..

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2018-01-18 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (214 votes). Check out past polls.

    Notices?