in reply to Re: How to compute the avg of a column of numbers
in thread How to compute the avg of a column of numbers
Divide by zero protection?
my $average = @values ? $total / @values : 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: How to compute the avg of a column of numbers
by Limbic~Region (Chancellor) on Mar 31, 2004 at 21:36 UTC |