foreach my $q (@questions){ my %p = %{$questions[$q]};# copy to be more clear here.. foreach $entry (keys %p){ print "$q : $p{$entry}\n"; } }