Re: what is ^M at the end of a line?

[email protected] ("Xavier Noria")
Newsgroups perl.beginners
Message-ID <[email protected]>
On Wed, May 21, 2008 at 4:20 PM, Remy Guo <[email protected]> wrote:

> it's really interesting... then how can i match that ^M using regex?
> i've tried "chomp" when reading each line but it doesn't work...

That's "\r" everywhere except in Macs before Mac OS X. Some programs
display "\r" as "^M" but that's just a way to show it, there's really
just one character.

I you'd like to order the ideas about how newlines work have a look at
this article:

   http://www.onlamp.com/pub/a/onlamp/2006/08/17/understanding-newlines.html

-- fxn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.