in reply to Redirecting STDOUT

Make a copy of STDOUT:
open SAVOUT, ">&STDOUT"; # copy of STDOUT open STDOUT, ">/dev/null";
Then to restore STDOUT later:
open STDOUT, ">&SAVOUT"; close SAVOUT;

Replies are listed 'Best First'.
Re: Re: Redirecting STDOUT
by mifflin (Curate) on May 03, 2003 at 00:01 UTC
    That works great, but how would you do the same using IO::File?
    I was just wondering if it was even possible.