in reply to Getting STDERR to write to STDOUT?
There is always the canonical:
Which merely says to send STDERR's output to wherever STDOUT was going (i.e. the screen or the browser). The example jcwren gave pretty much does the same thing as well: this is a case where it is pretty safe to reassign the whole typeglob, because most coders are not going to be using something like @STDERR or even $STDERR. If you are, stop it right now! :) Save it for an obfuscated code entry.open(STDERR, ">&STDOUT");
If this is for a cgi script, as is often the case with this question, a better thing than redirecting to STDOUT (in my opinion) is to send it to a file:
open(STDERR, ">/home/AM/stderr.out");
That way, you avoid "mixing" the outout of STDOUT and STDERR. The two are usually quite distinguishable, but when it gets stuck in the middle of some HMTL, all bets are off. :)
|
|---|