Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Dealing with files with differing line endings

by dd-b (Monk)
on Nov 05, 2021 at 21:21 UTC ( [id://11138488] : note . print w/replies, xml ) Need Help??


in reply to Re: Dealing with files with differing line endings
in thread Dealing with files with differing line endings

Good point! I was jumping back to a more general question than I need to solve. As you say, I can just force LF for line boundaries. Parsing the contents can handle various line separators with \R, I think it already does (or I could do my own chomp with suitable regexp to kill all kinds of line terminators).

Replies are listed 'Best First'.
Re^3: Dealing with files with differing line endings
by ikegami (Patriarch) on Nov 06, 2021 at 00:55 UTC

    As you say, I can just force LF for line boundaries

    No need to force anything. $/ is already a LF on all systems except ancient MacOS. Just replace chomp; with s/\s+\z//;.