print $doc->{species}{$key}{'physical-characteristics'}[0]{mass}[0] # and print $doc->{species}{$key}{'physical-characteristics'}[0]{appearance}[0]