On Monday, September 23, 2002, at 05:50  PM, Ronald J Kimball wrote:

> One way would be to interpolate the record separator into the regex:
>
> if (m,(\d+\.\d{1,2})\Q$/,) {

Ah!  I hadn't even though of that.  Of course, you can read from (and 
not -just- assign to) Perl's special variables too.  Good idea.

> However, it might be preferable to remove the record separator with
> chomp(), and then just match the end of the string with \z.  That way 
> you
> won't have a problem at the end of the file.

Right, that solves the problem.  I didn't know about the \z 
metacharacter.  It matches the end of the string only -- I assume that 
it's there for situations like this (when the value of $ is being 
messed with)?


Thank you,

Erik





--
Erik Price                                   (zombies roam)

email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to