use strict; use warnings; use Data::Dumper; my %HOAOH1 = ( 'details' => [ { 'name' => 'bbbb', 'time' => 1234, 'place' => 'AB' }, { 'name' => 'aaaa', 'time' => 5678, 'place' => 'CD' }, { 'name' => 'aaaa', 'time' => 91011, 'place' => 'EF' }, { 'name' => 'aaaa', 'time' => 121314, 'place' => 'GH' }, { 'name' => 'cccc', 'time' => 151617, 'place' => 'IJ' }, ] ); print Dumper \%HOAOH1; # See how useful Data::Dumper is for debugging hashes and more complex data structures? print $HOAOH1{'details'}; # Do you see why this just prints an array reference? print "\n"; print @{$HOAOH1{'details'}}; # Do you see why this just prints a bunch of hash references? print "\n"; foreach my $hash_reference (@{$HOAOH1{'details'}}) # Do you see how this loop is accesing the lowest level hash keys and values? { # Do you see the two different ways of de-referencing used here? print "$_=$$hash_reference{$_} " foreach (sort keys %{$hash_reference}); print "\n"; }