On Wed, Sep 18, 2002 at 05:01:35PM +0200, Damian Conway wrote:
> Steve Fink wrote:
> > print "yes" if "helo" =~ /hel { .pos-- } lo/;
>
> This definitely has to work. But remember the call to C<pos> is on
> the "match object" (i.e. $0), not the string.
>
> Actually, I would expect that *any* pattern with closures in it
> should act as though it were trying each branch and loop in the
> normal sequence (even if it optimizes that sequence away (which
> probably means it can't do that optimization in the first place
> (which means it should act as though it were trying each branch
> and loop in the normal sequence %-))).
I hope there will be a way to say "my code is side-effect free", to
permit optimizations.
Andrew