develooper Front page | perl.fwp | Postings from March 2002

Re: TPR1 post-mortem

Thread Previous | Thread Next
From:
Rick Klement
Date:
March 9, 2002 11:52
Subject:
Re: TPR1 post-mortem
Message ID:
3C8A67F5.45499EAC@pacbell.net
Stephen Turner wrote:
> 
> Some Perl features I noticed while playing this game. Maybe someone would
> be kind enough to explain them.
> 
> 4) I had to waste a character by using /..(?{CODE})\b/ instead of
> /..(?{CODE}$/. Actually, I do understand this. The regex optimiser is too
> smart, and only looks at the end of the string when it sees the $, but
> thankfully it's not smart enough only to look near word boundaries even when
> there's a \b in there.

Check out Eugene's:  /..(?{CODE})^/

-- 
Rick Klement

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About