Help for this page
( ( perl foo.pl | tee -a output.log ) 3>&1 1>&2 2>&3 3>&- | tee -a er +ror.log ) 3>&1 1>&2 2>&3 3>&-
my ($output_cache, $error_cache); *STDOUT = multiplex( \*STDOUT, $output_cache, "$log_dir/output.$0" ); ... my $tee = IO::Tee->new( $handle, $cache_handle, $log_handle ); return $tee; }