Perl: the Markov chain saw | |
PerlMonks |
Re^8: Dealing with files with differing line endingsby pryrt (Abbot) |
on Nov 15, 2021 at 22:08 UTC ( [id://11138857]=note: print w/replies, xml ) | Need Help?? |
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.
(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.)
update: hmm, you even knew it was on by default on Windows in Re^9: How do I display only matches (from the other conversation you alluded to), so I have to assume I've missed something in the context of this thread. I don't see anything in the posted code that would override that (other than the :raw open, of course)... so I'm more confused than when I first posted this. :-( Maybe I've had too hard of a day, and I should stop trying at this point. Time to go home! :-)
In Section
Seekers of Perl Wisdom
|
|