my $howMany = @colval; my $total = 0; foreach my $val ( @colval ) { $total = $total + $val; } my $avg = $total / $howMany;
I'm sure there's a 'shorter' way to do it, but i'm still getting my code minimalist skills up to par...
In reply to Re: Calculating Column Averages From A CSV File
by technojosh
in thread Calculating Column Averages From A CSV File
by country1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |