in reply to Re: persistent new line
in thread persistent new line
chomp only bites off the last character of the string. Windows is using \r\n for newlines. So, from porting point of view, using s/\r?\n$//g is much more portable.
Another solution would be using chomp in combination with an conditional chop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: persistent new line
by Marshall (Canon) on Feb 16, 2012 at 23:23 UTC |