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


in reply to Genbank file parsing

maybe something like:
my $found_origin = 0; while (my $line = <FILE>) { if ($line =~ /(FEATURES)\s+(\w+)/) { $found_origin = 0; $features = $2; } elsif ($line =~ /(COUNT)\s+(\d+)/) { $count = $2; } elsif ($line =~ /^ORIGIN/) { # print "$line\n"; $found_origin=1; } push @seq, "$line\n" if $found_origin and not $line =~ m!//!; }

it's a very simplistic solution.. there are probably better ones...

--
to ask a question is a moment of shame
to remain ignorant is a lifelong shame