#!perl -l use strict; use warnings; my $a = {child1 => [ {child2 => [ {child3 => [ {child4 => [1]} ]} ]} ]}; print $a->{child1}{child2}{child3}; #cut off {child3} and no problem. print '$a:',ref $a; print '$a->{child1}:',ref $a->{child1}; print '$a->{child1}{child2}:',ref $a->{child1}{child2}; print '@{$a->{child1}}:',scalar @{$a->{child1}}; __END__ $a:HASH $a->{child1}:ARRAY $a->{child1}{child2}:HASH @{$a->{child1}}:28004977