Or you could use SelectSaver - which is used to save and restore a selected filehandle. Or follow chromatic's suggestion. :)$previous_fh = select(STDOUT); #selects STDOUT and saves the selected +filehandle/handle $| = 1; #auto-flushes STDOUT select($previous_fh); # restores the previous filehandle/handle
In reply to Re: Is there a better way to restore STDOUT ?
by LD2
in thread Is there a better way to restore STDOUT ?
by slojuggler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |