Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

How do you set STDOUT back to...well, STDOUT?

by Riales (Hermit)
on Jun 13, 2012 at 19:39 UTC ( #976052=perlquestion: print w/ replies, xml ) Need Help??
Riales has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I'm following the advice found in how do i redirect STDOUT, STDIN, or STDERR to a FILE? on how to redirect STDOUT to a file. I'm having trouble figuring out how to push output back to STDOUT after I'm done directing output to the file.

Anybody know?

Thanks!

Riales

EDIT:I should clarify that I am using the first method (with IO::Handle).

Comment on How do you set STDOUT back to...well, STDOUT?
Re: How do you set STDOUT back to...well, STDOUT?
by runrig (Abbot) on Jun 13, 2012 at 19:49 UTC
    Check the docs where it says "Here is a script that saves, redirects, and restores STDOUT and STDERR..."

      Perfect--that was it! Thanks. As usual, I was looking through the wrong docs (perldoc IO::Handle)...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://976052]
Approved by stevieb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-28 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls