in reply to Re: how do i redirect STDOUT, STDIN, or STDERR to a FILE?
in thread how do i redirect STDOUT, STDIN, or STDERR to a FILE?

No need to open STDOUT in the first place - just selecting a file handle makes it the default target for a print operation:
open my $handle, '>', 'ch9.log' or die $!; select $handle; print Dumper(...); close $handle; select STDOUT; print "Done!\n";