my $footnotes = $data->{footnotes}{footnote}; foreach my $id (keys %$footnotes) { print "$footnotes->{$id}{content}\n"; }