Tell chomp what your newline is like this:
local $/ = "\r\n"; chomp;
Chomp chomps whatever you tell it a newline is. local localizes that setting so it's automagically replaced with the standard newline for your system when the block the local setting is within is done.
Name another language that makes stripping newlines this easy. 8-)
In reply to Re: Re: Re: Removing the ^M character, but also removing the newline
by steves
in thread Removing the ^M character, but also removing the newline
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |