Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: average of column

by toolic (Bishop)
on Sep 12, 2012 at 15:01 UTC ( #993238=note: print w/replies, xml ) Need Help??


in reply to average of column

use warnings; use strict; use Acme::Tools qw(avg); my @nums; while (<DATA>) { push @nums, (split)[3]; } print avg(@nums), "\n"; __DATA__ a b c 3 d e f 4 h j k 5

See also:

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993238]
help
Chatterbox?
[Corion]: GrandFather: Yeah, I'm currently in the same situation - I get DOM node IDs from Chrome, except that they vanish at some point in time, or event, or whatever. My current workaround is to re-fetch the node IDs all the time, but that is slow

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2017-08-24 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (365 votes). Check out past polls.

    Notices?