A complaint about different line length from Windows files is likely due to "\r", which chomp will do nothing to.
s/\s+$//
Will trim all trailing whitespace, which is what I recommend over chomp. It catches "\n" and "\r" as well as spaces and tabs (which should never be allowed to have significance at the end of a line where they are extra invisible).
- tye
In reply to Re^2: different length of a line from linux and windows textfile? ("\r")
by tye
in thread different length of a line from linux and windows textfile?
by Microcebus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |