Localise the change to STDOUT. EG:-
{ local *STDOUT; open(STDOUT, "> $LogFile") || die "Failed: $!"; print STDOUT "Blah"; } print "This should appear on the console window again";
However, I do have to ask - why use STDOUT for this as opposed to another filehandle?
Update: Aaarrrggghhh. Beaten to it by BUU. Apologies for the duplicate response.
In reply to Re: Undo a STDOUT redirect
by dtr
in thread Undo a STDOUT redirect
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |