On Tue, 24 Nov 2009 18:33:30 +1000, Dermot <paik...@googlemail.com> wrote:
2009/11/23 Dave Tang <d.t...@imb.uq.edu.au>:
On Tue, 24 Nov 2009 09:39:09 +1000, Dermot <paik...@googlemail.com>
wrote:
2009/11/23 Dave Tang <d.t...@imb.uq.edu.au>:
On Mon, 23 Nov 2009 23:14:51 +1000, Shawn H Corey
<shawnhco...@gmail.com>
Hi Shawn et al.,
I am also intrigued by the \z anchor. I had a look at perldoc
perlreref
and
found
\z Match absolute string end
My question is what is the difference between \z and $? And when
should I
use \z rather than $ ? From the same documentation:
$ Matches at the end of the string (or line, if /m is used)
From perlre
The \A and \Z are just like "^" and "$", except that they won't
match multiple times when the /m modifier is used, while "^" and "$"
will match at every internal line boundary. To match the actual end of
the string and not ignore an optional trailing newline, use \z .
Thanks Dermot! I guess I should RTFM a bit more next time, before
posting a
question.
Lesson learnt :P
Lol, I only know because I asked the same question myself (on a
different list) and got pretty much the same style answer. I wouldn't
have found it on my own.
Good luck,
Dp.
Hehe I just thought it was funny that I read the manual to find out what
\z meant but it didn't occur to me read more about it from the manual :P
Which was why I was a bit hard on myself.
Thanks again!
Dave
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/