Then just print everything to $log.if ($resp =~ /^y/i) { $log = IO::Tee -> new(">stdout.txt", \*STDOUT); } else { $log = *STDOUT{IO}; }
Cheers
In reply to Re: Redirecting STDOUT to file and screen as an afterthought, on Windows.
by hlen
in thread Redirecting STDOUT to file and screen as an afterthought, on Windows.
by spikey_wan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |