in reply to Re: File I/O question
in thread File I/O question
Discounting an obsolete build of Perl on an obsolete version of Mac, there's no OS dependency. The only difference is whether the :crlf I/O layer is used or not.
The :crlf layer is used by default on Windows and in environments where it appears in $ENV{PERLIO}. Overriding the default PerlIO layers can avoid it, and the one-argument call to binmode disables it.
| With :crlf IO layer absent or disabled | |||
|---|---|---|---|
| MacPerl* | Everything else | ||
| \n | CR | LF | |
| \r | LF | CR | |
| \012 | LF | LF | |
| \015 | CR | CR | |
| \015\012 | CR LF | CR LF | |
| With :crlf IO layer present and enabled | |||
|---|---|---|---|
| MacPerl* | Everything else | ||
| \n | N/A | CR LF | |
| \r | N/A | CR | |
| \012 | N/A | CR LF | |
| \015 | N/A | CR | |
| \015\012 | N/A | CR CR LF | |
MacPerl is an obsolete build of Perl for obsolete Macs. It predates PerlIO.
|
|---|