use strict; use warnings; use Data::Dumper; my %totals; for(1..10){ @totals{qw(a b c)} += (1,2,3); } print Dumper \%totals; #### %totals = ( 'a' => 10, 'b' => 20, 'c' => 30, ); #### ( 'a' => undef, 'b' => undef, 'c' => 30, );