in reply to Re: Regular expressions CR/Linefeeds
in thread Regular expressions CR/Linefeeds

There is a section in perlport concerning the handling of line feeds across different platforms - Unix traditionally uses \012, one kind of Windows I/O uses \015\012, and Mac OS uses \015. The recommended pattern for matching given in this documentation is \015?\012 given the differences in the interpretation of \n by STDIO (or PerlIO depending upon the version and build of Perl).

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001000100011"))'