I'm sure that works.
But I find I sometimes get confused about how Perl inteprets \n (sometimes it's \012 and sometimes it's \015\012 - see perlport for the details). In order to minimise my confusion I find it helpful to always refer to the control characters (\cJ and \cM) or the numeric character codes (\012 and \015) when I'm converting newline characters.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re^2: Clean line ends
by davorg
in thread Clean line ends
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |