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