Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: The Perl Review

by chipmunk (Parson)
on Feb 03, 2002 at 04:54 UTC ( #143024=note: print w/ replies, xml ) Need Help??


in reply to The Perl Review

My best solution is 47 characters:

#!/usr/local/bin/perl -l print hole(uc $_) for @ARGV; sub hole { # 1 2 3 4 #2345678901234567890123456789012345678901234567 my$d;map$d=$d*36+(/\d/?$_:-55+ord),pop=~/./g;$d }
The simple framework allows for convenient testing: % perl base36.pl 1 A 10


Comment on Re: The Perl Review
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://143024]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-07-04 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls