in reply to Re^7: Dealing with files with differing line endings
in thread Dealing with files with differing line endings
Only if you explicitly specify the :crlf layer, which your code doesn't do.
Strawberry perl.exe adds the :crlf layer unless you tell it otherwise.
C:\usr\local\share>perl -MConfig -MPerlIO -le "print for PerlIO::get_l +ayers(STDIN), '-'x10, $Config{myuname}" unix crlf ---------- Win32 strawberry-perl 5.30.0.1 #1 Thu May 23 12:20:46 2019 x64
(I haven't used Active State since the early aughts, so I cannot tell you how the other major Windows port of perl behaves, though my vague recollections were that I had never heard of IO layers back then, but that newlines just worked right, as they do with modern Strawberry, so I am assuming they also set :crlf for you.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Dealing with files with differing line endings
by haukex (Archbishop) on Nov 16, 2021 at 07:17 UTC |