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";