my $total = 0; foreach(values %hash) { $total += $_; } print "$total\n";