That's been suggested, but it doesn't work :(
From perlfaq8:
Note that you cannot simply open STDERR to be a dup of STDOUT in your Perl program and avoid calling the shell to do the redirection. This doesn't work:
open(STDERR, ">&STDOUT"); $alloutput = `cmd args`; # stderr still escapes
This fails because the open() makes STDERR go to where STDOUT was going at the time of the open(). The backticks then make STDOUT go to a string, but don't change STDERR (which still goes to the old STDOUT).
Cheers,
Ovid
New address of my CGI Course.
In reply to Re^2: Synchronizing STDERR and STDOUT
by Ovid
in thread Synchronizing STDERR and STDOUT
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |