Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Fore!!! (was The Perl Review)

by jynx (Priest)
on Feb 02, 2002 at 01:35 UTC ( #142840=note: print w/ replies, xml ) Need Help??


in reply to Fore!!! (was The Perl Review)
in thread The Perl Review


ok,

i'm not even a contender for this one, but in the spirit of TMTOWTDI i submit the following 2:

# 1 (57 characters) $a+=($_-($_|0?0:55))*36**$b++while$_=chop$ARGV[0];print$a # 2 (63 characters) print[map$a+=($_-($_|0?0:55))*36**$b++,reverse pop=~/./g]->[-1]
jynx

update: bad jynx! bad, evil, naughty jynx! not testing thoroughly! not golfing thoroughly! *sigh* neither of the above work correctly, i'm currently working on fixing them. *sigh* sorry 'bout that.

update2: here's both of them:

# 1 (still 57 characters, with props to petral for the idea) $a+=(-55+/\d/*7+ord)*36**$b++while$_=chop$ARGV[0];print$a # 2 (now 64 characters, with props to blakem for the idea) print[map$a+=(/\d/?$_:-55+ord)*36**$b++,reverse pop=~/./g]->[-1]


Comment on Re: Fore!!! (was 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://142840]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-12-18 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (61 votes), past polls