Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: The Perl Review

by petral (Curate)
on Feb 04, 2002 at 18:34 UTC ( #143274=note: print w/ replies, xml ) Need Help??


in reply to The Perl Review

Here's another similar one:

$b=$b*36-48-7*/\D/+ord for pop=~/./g; print$b,$/
36 or 47 chars depending on how you count. Another WTDI using recursion:
sub x{ $_&&-7*/\D$/+ord(chop)-48+36*&x } $_=pop; print x,$/
which is 31 chars inside the sub and 55 chars total.

  p


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://143274]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2015-07-30 17:40 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 (273 votes), past polls