# works print $ref->{incident}->{'GDOT-INC-260089'}->{location}->{county}->{content} . "\n"; # doesnt work print $ref->{'incident'}->[0]; #### print $ref->{incident}->[0]->{location}->{county}->{content} . "\n"; #### my @sorted_keys = sort keys %{$ref->{incident}}; for my $incid ( @sorted_keys ) { # do something with $$ref{incident}{incid} ... }