# close close STDOUT; # redirect open STDOUT, '>', "/some/path/to/file" or die "Can't redirect STDOUT: $!";