Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Luhn Number Golf

by petral (Curate)
on Feb 27, 2002 at 17:02 UTC ( #147967=note: print w/replies, xml ) Need Help??


in reply to Re: Luhn Number Golf
in thread Luhn Number Golf

52 chars:
sub luhn { $_=reverse@_;s/(.)(.)/$1.$2*2/ge;s/\B/+/g;eval=~/0$/ }


  p

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2021-04-17 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?