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//;.
In reply to Re^3: Dealing with files with differing line endings
by ikegami
in thread Dealing with files with differing line endings
by dd-b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |