Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Call for code samples!

by petral (Curate)
on Nov 28, 2001 at 04:06 UTC ( [id://127963]=note: print w/replies, xml ) Need Help??


in reply to Call for code samples!

Another fun one:   add up all the digits in a number:
$n = 6345789; $n =~ s/\B/+/g; $t = eval $n; # 42 $n = '634-5789'; $n =~ s/\B/+/g; $t = eval $n; # 32
  p

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-23 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found