I still don't quite understand why perl doesn't seemlessly translate \r\n to a \n.
Presumably, the perl that codepad.org is running is a Unix-built perl, which means it does not add a :crlf PerlIO layer to file handles by default (as is done on Windows). The :crlf layer is responsible for transparent \r\n <—> \n linefeed translations (see PerlIO).
Adding binmode DATA, ":crlf" before slurping in the data should emulate Windows perl behavior on codepad.org.
In reply to Re^3: why isn't split() working here?
by Anonyrnous Monk
in thread why isn't split() working here?
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |