in reply to RE: Intermixing STDOUT and STDERR to a file
in thread Intermixing STDOUT and STDERR to a file

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
RE: RE: RE: Intermixing STDOUT and STDERR to a file
by merlyn (Sage) on Sep 29, 2000 at 22:17 UTC
    open STDERR, ">&STDOUT"; # Open STDERR open STDOUT, ">o.txt";
    You've done the operations in the reverse order. Your stderr now goes where stdout used to go, and stdout is now going into the file. If you want them to go to the same place, reverse the operations.

    -- Randal L. Schwartz, Perl hacker

RE (tilly) 3: Intermixing STDOUT and STDERR to a file
by tilly (Archbishop) on Sep 29, 2000 at 21:36 UTC
    Define "work".

    merlyn redirected STDERR to STDOUT, not the other way around. As a matter of taste I would do the same. My reasoning would be that from the command prompt it is more natural to manipulate, redirect, pipe, etc STDOUT than STDERR.

    A reply falls below the community's threshold of quality. You may see it by logging in.