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.
--In reply to Re: changing STDOUT
by Leviathan
in thread changing STDOUT
by JFarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |