use strict; use warnings; use Data::Dumper; my %h; my $itemArea = 1; my $itemID = 1; $h{$itemArea}{$itemID} = [qw(a b c)]; print Dumper \%h;