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...
In reply to Re: Genbank file parsing
by insaniac
in thread Genbank file parsing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |