Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Opening and Closing STDOUTby Anonymous Monk |
on Mar 05, 2003 at 04:22 UTC ( [id://240525]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, In a script I'm working on I had to use the following code: 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:
And then ran the script, nothing would appear on my console...I wouldn't see "Gee, this is fun!". Anyone know how I can fix this (e.g. how I can "reopen" STDOUT to whatever it was before I messed with it)?
Back to
Seekers of Perl Wisdom
|
|