in reply to Re: Duping filehandles
in thread Duping filehandles

Thanks ambrus. I needed to be able to print stuff to the terminal after redirecting STDOUT to some other file and your info (after a pointer from the Chatterbox) provided useful guidance.

open( SAVE_OUT, ">&STDOUT" ) or die "Could not open SAVE_OUT: '$!'\n"; open STDOUT, ">> $out_file" or die "Could not redirect STDOUT to '$out_file': '$!'\n"; my $dd_version = $0 . " 1.1"; print SAVE_OUT "$dd_version\n";