in reply to Re^2: Capturing all (and I mean all) output to a file
in thread Capturing all (and I mean all) output to a file

Isn't it possible to redirect/reopen STDERR to STDOUT _before_ you call new IO::Tee ?

Replies are listed 'Best First'.
Re^4: Capturing all (and I mean all) output to a file
by flippy (Novice) on Jan 12, 2005 at 11:38 UTC
    I don't think so - STDOUT doesn't go to the file -- it's the $tee filehandle that does the work... Need to direct STDERR to $tee, but my best guess, open (STDERR, ">$tee") doesn't work...

      No but

      open STDERR, ">&", $tee;
      will.

      /J\

        I'm getting

        Unknown open() mode '>&'

        old version of perl (5.6), perhaps?

        None of the other open modes work either.