Help for this page

Select Code to Download


  1. or download this
    my %add = ( a => 1,
                b => 2,
    ...
        $totals{$_} += $add{$_} for keys %add;
    }
    print Dumper(\%totals);
    
  2. or download this
        while (my ($k, $v) = each %add) {
            $totals{$k} += $v;
        }