I think you are confusing the parts your different variables play. Is this what you want?
my $newno = 0; while (my ($number) = $sth->fetchrow_array) { $numbergraf++; # whatever that is $newno += $number; } $output .= qq~ The sum of xxx is $newno ~;
I'm not sure what you're trying to do with substr, but it doesn't look consistent with a sum.
After Compline,
Zaxo
In reply to Re: calculate all the data
by Zaxo
in thread calculate all the data
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |