in reply to Calculating Column Averages From A CSV File

if the values you need to average are in @colval:

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...