foreach my $key (keys %HoA) { foreach my $value (values %HoA) { my @Array = $value; #### for my $key (keys %HoA){ # loop through the keys my $value = $HoA{$key}; # get the array ref for this key my @Array = @{$value}; # dereference it to get the array