while (my ($k, $v) = each %add) { $totals{$k} += $v; }