Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: Golf Challenge: FizzBuzz

by merlyn (Sage)
on Mar 02, 2007 at 20:18 UTC ( #602951=note: print w/replies, xml ) Need Help??


in reply to Re^3: Golf Challenge: FizzBuzz
in thread Golf Challenge: FizzBuzz

while (length($num) > 1) { my $sum = 0; map { $sum += $_ } split '', $num; $num = $sum; }
Ugh. Void Map. Ugh. How about this instead:
1 while $num =~ s/(\d)(\d)/$1 + $2/e;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602951]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2017-02-21 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (307 votes). Check out past polls.