my $tag = $f->primary_tag; #### push @{$sorted_features{$tag}}, $f if ($tag =~ /CDS|genes|primer_binds|sources/); #### my %sorted_features; my %want = map { $_ => 1 } qw/CDS genes primer_binds sources/; for my $f ( @features ) { my $tag = $f->primary_tag; push @{$sorted_features{$tag}}, $f if( $want{$tag} ); }