jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
But at some point I would like to close the file and from that moment on I would like to print everything to screen. I triedopen(STDOUT, ">my_file") ; select STDOUT; $| = 1;
And it doesn't work. Probably &1 and STDOUT are the same thing.close STDOUT ; open STDOUT,">&1" or die "Cannot do it" ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reuse STDOUT after it was closed
by davorg (Chancellor) on Mar 12, 2007 at 11:12 UTC | |
by hangon (Deacon) on Mar 12, 2007 at 11:34 UTC | |
by sgifford (Prior) on Mar 12, 2007 at 16:32 UTC | |
|
Re: reuse STDOUT after it was closed
by rodion (Chaplain) on Mar 12, 2007 at 10:54 UTC | |
|
Re: reuse STDOUT after it was closed
by shigetsu (Hermit) on Mar 12, 2007 at 14:50 UTC | |
|
Re: reuse STDOUT after it was closed
by jeanluca (Deacon) on Mar 13, 2007 at 15:25 UTC |