my $newline = "\n"; $_ eq "crlf" and $newline = "\r\n" for PerlIO::get_layers(*STDOUT);