open STDOUT, ">>somelogfile" or die "opening logfile: $!\n"; open STDERR, ">&STDOUT" or die "dup'ing STDOUT to STDERR: $!\n";