Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Calculating Row Averages From a CSV File

by Prof Vince (Friar)
on Aug 15, 2007 at 14:08 UTC ( #632746=note: print w/ replies, xml ) Need Help??


in reply to Calculating Row Averages From a CSV File

Or a good ol' one-liner :

perl -Mstrict -MList::Util=sum -wlne 'my @a = grep $_, split /,/; print shift @a, ":", sum(@a) / @a"' test.dat


Comment on Re: Calculating Row Averages From a CSV File
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2014-12-19 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (84 votes), past polls