Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: "Junkyard" Puzzle: Average of Numbers

by MeowChow (Vicar)
on May 13, 2001 at 22:56 UTC ( #80086=note: print w/replies, xml ) Need Help??


in reply to "Junkyard" Puzzle: Average of Numbers

Flibbertigibbit! All the fun ones have been done...
use List::Util qw(sum); sub avg { (sum @{$_[0]}) / @{$_[0]} }
oops: didn't notice the last rule. never mind, run along now...
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://80086]
help
Chatterbox?
[Eily]: s/complete ness/complete mess/ :P
[Eily]: and you can overload "0+" rather than bool, as numification is used instead of stringification in boolean context when available

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2017-07-27 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (415 votes). Check out past polls.