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

Re: [FWP] string increment



Rick Delaney wrote:
> 
> Tony Payne wrote:
> >
> > here it is, just a little bit shorter
> >
> > perl -le'$i=3;$_=aaaa;do{print}until++substr($_,$i,1)eq z&&!$i--;print'
> 
> And now for something completely different.
> 
>   perl -le'print$_=aaaa;for$i(1..4){print++$_ for($_)x25;$\=chop.$\}'
> 

And even more different (fore!!!):

    perl -le'print$_=aaaa;print while s/(.*)([^z])/$1.++($x=$2)/e'

-- 
Rick

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