or, if they specify a terminator, use binmode and their selection, otherwise, don't use binmode and output "\n".my $newline = "\n"; $_ eq "crlf" and $newline = "\r\n" for PerlIO::get_layers(*STDOUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there a variable in which Perl stores the native file delimiter for the platform on which your script is running?
by tye (Sage) on Dec 23, 2005 at 05:19 UTC |