[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] 4 Consecutive Letters




Neko wrote:
> 
> This will tie it:
> 
>     perl -ne'/((.)(?=(??{chr 1+ord$2}))){3}/&&print'

    perl -ne'/(.)((??{chr 1+ord$+})){3}/&&print'

> Unfortunately, this doesn't work:
> 
>     perl -ne'/((.)(?=(??{++($a=$2)}))){3}/&&print'
> 
> But this does:
> 
>     perl -ne'/((.)(?=(??{"".++($a=$2)}))){3}/&&print'
> 
> Anyone know why?

Because we're playing with something that's still very experimental?  In
the first case the subexpression isn't recompiled after the first time.
I suppose this is a bug.

-- 
Rick Delaney
rick.delaney@home.com

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe