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

Re: [FWP] Recursion, anyone?



"Kort, Eric" wrote:
> 

It's just base 63 arithmetic, so:

#!/usr/bin/perl -l
$a=$_*63,print+(A..Z,a..z,0..9,'-')[map{($a/=63)%63}1..$n]for
0..63**($n=pop)-1

> 
> Anyone care to improve on my first attempt?  If someone reduces this to a
> one-liner, I promise never to post again!

I reject your promise, fun problems are always fun problems, no
matter who comes up with them. so keep posting...  :)

-- 
Rick Klement

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