# first, create a reference to the level you are interested in. my $oranges = $xml->{Fruits}->[0]->{Season}->{Orange}; # then do whatever you need to with it, ie: foreach (keys %$oranges){ ...