in reply to Re^5: different length of a line from linux and windows textfile? ("\r")
in thread different length of a line from linux and windows textfile?
No. You are wrong. Yes, you show code that uses chomp and results in "\r"s being dropped. Now drop the chomp and see that there are still no "\r" characters. As I already explained, the lack of "\r" has nothing to do with chomp.
On Windows chomp will remove both "\n" and "\r\n".
It is a lack of binmode that strips "\r". chomp only strips "\n". So you can also see this by adding binmode and showing that "\r" is not stripped despite your use of chomp (even though you are using Windows Perl).
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: different length of a line from linux and windows textfile? (still wrong)
by fishmonger (Chaplain) on Mar 17, 2014 at 23:39 UTC | |
by tye (Sage) on Mar 17, 2014 at 23:51 UTC |