in reply to Opening and Closing STDOUT
Instead of closing and opening STDOUT, you could use select as follows:
open(JUNK, ">junk.txt") or die; print "this is going to stdout\n"; select JUNK; print "this is going to junk\n"; select STDOUT; print "this is again going to stdout\n";
This way you can leave your filehandles open and switch whenever you need to with little effort.
HTH.
--
hiseldl
What time is it? It's Camel Time!
|
|---|