On 2011-07-22 03:06, Shawn H Corey wrote:
According to perlre, under "Regular Expressions",
$ Match the end of the line (or before newline at the end)
That means it can match the end of the string or a newline at the end of
the string.
Hello Shawn,
You are not reading exact enough. The $ can not match "a newline at the
end of the string". It matches a (relative) position, not a character.
This is also called "zero-width".
Further appreciate the word "line" (in stead of "buffer" or "string") in
its definition, and check the m-modifier.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/