in reply to Re: Reset STDERR to console
in thread Reset STDERR to console

As you'd know, by default, STDERR points to STDOUT.

Oh really?

$ perl -le 'print STDOUT foo' 1>/dev/null $ perl -le 'print STDERR foo' 1>/dev/null foo

So, not true.

The solution to the original question involves saving the old STDERR in a variable before reopening it. If I remember correctly, perlopentut talks about that.

Replies are listed 'Best First'.
Re^3: Reset STDERR to console
by anonymized user 468275 (Curate) on Apr 01, 2011 at 11:24 UTC
    It would have been accurate to say that the IO handles for STDERR and STDOUT are assigned to the same device rather than that one IO handle is assigned to the other.

    One world, one people

      Not really. STDOUT and STDERR default to be the same as the parent's STDOUT and STDERR respectively. There is no relation to devices.
A reply falls below the community's threshold of quality. You may see it by logging in.