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

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...

Replies are listed 'Best First'.
Re^5: Capturing all (and I mean all) output to a file
by gellyfish (Monsignor) on Jan 12, 2005 at 11:44 UTC

    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.

        It could be a version thing (I don't have 5.6 available to test with at the moment.) Does:

        my $foo = fileno($tee); open STDERR, ">&$foo";
        work ?

        /J\