Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I had to do so because the stuff I was doing in between the "open" and "close" statements used a module that spat out a lot of chatter to STDOUT, but I didn't want it to appear on the console when the script was run. The only problem is that after doing this, nothing would print to STDOUT from print statements further down the script! E.g., if I did the above and then followed with:open STDOUT, ">$tempfile"; #do some stuff here close STDOUT;
print "Gee, this is fun!\r\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Opening and Closing STDOUT
by chromatic (Archbishop) on Mar 05, 2003 at 04:44 UTC | |
by submersible_toaster (Chaplain) on Mar 05, 2003 at 06:00 UTC | |
by hawtin (Prior) on Mar 05, 2003 at 07:37 UTC | |
by submersible_toaster (Chaplain) on Mar 05, 2003 at 23:47 UTC | |
|
Re: Opening and Closing STDOUT
by graff (Chancellor) on Mar 05, 2003 at 05:02 UTC | |
|
Use select to redirect STDOUT (Was Re: Opening and Closing STDOUT)
by hiseldl (Priest) on Mar 05, 2003 at 14:23 UTC | |
|
Re: Opening and Closing STDOUT
by nite_man (Deacon) on Mar 05, 2003 at 10:03 UTC |