in reply to Re: Re: Removing the ^M character, but also removing the newline
in thread Removing the ^M character, but also removing the newline
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-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Removing the ^M character, but also removing the newline
by steves (Curate) on Dec 30, 2001 at 03:05 UTC |