mobiGeek has asked for the wisdom of the Perl Monks concerning the following question:
One way is to detect line-endedness
$first_line =~ m@((\r)?\n)@ and $NL = $1;and then use $NL for any newlines, but I wonder if there isn't a niftier, Perlish way?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Line endedness
by rinceWind (Monsignor) on Nov 20, 2002 at 16:02 UTC | |
by mobiGeek (Beadle) on Nov 20, 2002 at 16:12 UTC |