foreach my $element (@{$hash{$key}}{ #work on $element; } #### use strict; use warnings; use Data::Dump qw(pp); my %hash; push @{$hash{'article'}},{}; $hash{'article'}[0]= {'SKU'=> ['CDS0013'], 'InternalSKU'=>'179', 'AvailableItems'=>['100']}; $hash{'article'}[1]= {'SKU'=> ['CDS0014'], 'InternalSKU'=>'180', 'AvailableItems'=>['102']}; foreach my $key (keys %hash){ #print ref $hash{$key},"\n"; foreach my $element (@{$hash{$key}}){ # print ref $element,"\n"; $articleCount = scalar @{$hash{$key}}; #get the count ... foreach my $innerKey(keys %{$element}){ print "$element->{$innerKey}","\n"; #some more referencing yet } } } print "there are $articleCount articles\n"; print pp \%hash;