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

Re: [FWP] 4 Consecutive Letters




abigail@foad.org wrote:
> 
> But since ++$b.++$b isn't properly defined, AFAIK, we could use:
> 
>             perl -ne'/(.)(??{++($b=++($a=$1));$a.$b.++$b})/&&print'

Don't forget the common golf trick of replacing ($1) with $&,

    perl -ne'/.(??{++($b=++($a=$&));$a.$b.++$b})/&&print'

though I can't say that that's properly defined, either.

-- 
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