Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://501417]
help
Chatterbox?
[Eily]: good moaning Lanx, good morning everyone else :)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-12-14 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (388 votes). Check out past polls.

    Notices?