# First, save STDERR in case you need it later. open OLDERR, ">&", \*STDERR or die "Can't dup STDERR: $!"; # Second, dupliate STDOUT, by pointing STDERR to it. open STDERR, ">&STDOUT" or die "Can't dup STDOUT: $!"; print STDOUT "My test string.\n";