my $sources = $ref->{'sas_residue_annotation'}->{'sources'}; foreach my $s (@{ $sources }) { print $s->{'source_name'}->[0], "\n"; }