Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Riales (Hermit)
on Jun 13, 2012 at 19:39 UTC ( [id://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).

Replies are listed 'Best First'.
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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-03-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found