--Daveforeach my $month (@calendar) { my $count = 0; my $total = 0; foreach my $value ( grep { $_ != 0 } map { $hoursWorked{$_}{$month} } @members ) { $total += $value; $count ++; } $avg{$month} = $count ? $total/$count : 0; }
In reply to Re: Mathematical averages
by dpuu
in thread Mathematical averages
by arrow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |