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

Re: TPR1 post-mortem

Thread Previous | Thread Next
Rick Klement
March 9, 2002 11:52
Re: TPR1 post-mortem
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About