Divide by zero protection?
my $average = @values ? $total / @values : 0;
In reply to Re: Re: How to compute the avg of a column of numbers
by pbeckingham
in thread How to compute the avg of a column of numbers
by cosmicsoup
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |