Your question could be clarified, but I'm assuming you have a hash that has numerical values, and you want to add all the values...
my $total = 0; foreach(values %hash) { $total += $_; } print "$total\n";
In reply to Re: How can I add the values of a hash?
by jasonk
in thread How can I add the values of a hash?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |