in reply to Reopening STDOUT

You can open a new filehandle, select() it, and then reselect the old one:

open NEW_STDOUT, '>/dev/null' or die $!; select(NEW_STDOUT); print "Won't be printed\n"; select(STDOUT); close(NEW_STDOUT); print "Printing again\n";

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated