Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to send both STDOUT and STERR to the same file
by ikegami (Patriarch) on Oct 19, 2006 at 17:43 UTC | |
by Anonymous Monk on Oct 19, 2006 at 17:51 UTC | |
|
Re: how to send both STDOUT and STERR to the same file
by davido (Cardinal) on Oct 19, 2006 at 17:40 UTC | |
|
Re: how to send both STDOUT and STERR to the same file
by chrism01 (Friar) on Oct 20, 2006 at 02:15 UTC | |
|
Re: how to send both STDOUT and STERR to the same file
by jeanluca (Deacon) on Oct 19, 2006 at 17:25 UTC | |
by Anonymous Monk on Oct 19, 2006 at 17:32 UTC | |
by jeanluca (Deacon) on Oct 19, 2006 at 17:37 UTC |