foreach $class (@kids) { # inspect each top level (class) array # here, $class is a reference to an array, so... foreach $student (@$class) { # here, $student is a reference to a hash, so... print "$student->{'name'}\n"; # or you can iterate: foreach $fact (keys %{$student}) { # note that protecting $student with surrounding # curly braces will make keys() a lot happier # I like to pronounce the construct as: # "The hash to which $student refers" # and we may now print: print "$fact: $student->{$fact}\n"; # or if you are in a particularly perverse mood, you may say: print "$fact: $$student{$fact}\n"; # if you DO find yourself in that mood though, consider # adjusting your meds! :-) } } }