in reply to changing STDOUT

You already backed up STDOUT in $stdout. So all you need to do to print to STDOUT only is:

open( $stdout , ">&STDOUT" ); open( $stderr , ">&STDERR" ); open( STDOUT , "| perl tee.pl -a $fErrorLogFile" ); select STDOUT; $| = 1; print "Some text....\n"; .. .. code .. .. select $stdout; print "Some other text....\n";

Note that you might have some buffering problems here.

--
Leviathan