foreach my $feat (@f) { my $ann=$feat->annotation; next unless ($ann->get_Annotations('coded_by')); my @coded=$ann->get_Annotations('coded_by'); foreach my $location (@coded) { print $location->value, " is the location that codes this protein\n"; } } }