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

Re: [FWP] string increment



Rick Delaney wrote:
> 
> "David L. Nicol" wrote:
> >
> >   perl -le'$_=aaaa;1while print,s/[^z]+/++($x=$&)/e'
> 
> It'll be hard to beat that.  Nice shot!

New shot, shorter (but *much* slower) is:

      perl -le'/^a*.z*$/&&print for aaaa..zzzz'

(If 80 is par, what's 41 called?)
-- 
Rick Klement

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