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 .

HTH,
Dp.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to