Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Undo a STDOUT redirect

by chester (Hermit)
on Oct 19, 2005 at 20:46 UTC ( #501417=note: print w/ replies, xml ) Need Help??


in reply to Undo a STDOUT redirect

From perldoc open:

use warnings; use strict; open my $old, ">&", "STDOUT" or die $!; open STDOUT, ">", "test" or die $!; print "To file...\n"; close STDOUT or die $!; open STDOUT, ">&", $old or die $!; print "To console...\n";


Comment on Re: Undo a STDOUT redirect
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (18)
As of 2015-07-30 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls