Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: minimum, maximum and average of a list of numbers at the same time

by blazar (Canon)
on Nov 10, 2005 at 14:36 UTC ( #507381=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($min, $max, $sum) = calculate [qw/min max sum/], @list;
    
  2. or download this
    my $stats=List::Util->calculate([qw/min max sum/])->of(@list);
    print $stats->min, "\n";
    
  3. or download this
    calculate [qw/min max sum/], @list;
    print List::Util::lastrun->max, "\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-05-24 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?