STDOUT gets redirected fine but STDERR still gets dumped to the screen. Any suggestions?use IO::Handle; my $file = 'C:\Progra~1\Ethereal\output.dat'; open STDERR, ">&STDOUT"; open (OUTPUT, ">$dat") || die $!; STDOUT->fdopen(\*OUTPUT, "w") || die $!; print "This is STDOUT\n"; warn "This is a warning\n";
In reply to how to send both STDOUT and STERR to the same file by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |