in reply to Re: different length of a line from linux and windows textfile?
in thread different length of a line from linux and windows textfile?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: different length of a line from linux and windows textfile? ("\r")
by SimonPratt (Friar) on Mar 17, 2014 at 16:48 UTC | |
by choroba (Cardinal) on Mar 17, 2014 at 17:01 UTC | |
by tye (Sage) on Mar 17, 2014 at 18:02 UTC | |
by fishmonger (Chaplain) on Mar 17, 2014 at 22:00 UTC | |
by tye (Sage) on Mar 17, 2014 at 22:34 UTC | |
by fishmonger (Chaplain) on Mar 17, 2014 at 23:39 UTC | |
|