print "Should go to stdout.\n"; { local *STDOUT; open(STDOUT, ">afile.txt") or die "Couldn't open afile.txt: $!"; print "Should go to afile.txt\n"; } print "Should go to stdout.\n";
In reply to Re: Is there a better way to restore STDOUT ?
by chromatic
in thread Is there a better way to restore STDOUT ?
by slojuggler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |