select STDERR; $|=1 unless (open STDERR, '|-') { eval { open ERRLOG, ">/tmp/errlog" or die; while(<>) { print ERRLOG $_; print STDERR $_; } }; exit(0); } # repeat for STDOUT
In reply to Re: Copy STDOUT and STDERR to logfile and also display to screen
by salva
in thread Copy STDOUT and STDERR to logfile and also display to screen
by boat73
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |