http://www.perlmonks.org?node_id=421331


in reply to Genbank file parsing

You can also try not to reinvent the wheel. Bio::SeqIO can parse genbank files.
use Bio::SeqIO; use strict; my $in = Bio::SeqIO->new(-format =>'genbank',-file => $file); # print the sequence from the genbank file while( my $seq = $in->next_seq ) { print $seq->seq(), "\n"; }
Also see Ian Korf's lightweight GenBank parser: GBlite.pm