in reply to Genbank file parsing
While not exactly an answer to your question, but a help for parsing sequence formats. It seems that you are parsing EMBL files. Easier way to get sequences from those might be emboss seqret or perhaps bioperl.
In Section
Seekers of Perl Wisdom