in reply to Re^2: trying to copy STDERR STDOUT on win32
in thread trying to copy STDERR STDOUT on win32

You have to dup STDOUT and then tie STDOUT with Tie::F::M, giving the dup of STDOUT as one of the 'real' handles to write to. Here's an example:
open F, '>outfile.txt' or die "opening output file: $!\n"; open DUPOUT, '>&STDOUT' or die "Can't dup stdout: $!\n"; tie *STDOUT, 'Tie::FileHandle::MultiPlex', *DUPOUT, *F;

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Replies are listed 'Best First'.
Re^4: trying to copy STDERR STDOUT on win32
by boat73 (Scribe) on Aug 18, 2005 at 16:55 UTC
    Ahhhh, I see. Thanks so much, this is exactly what I wanted to do.