open (FILE, $ARGV[0]) or die "unable to open FILE\n"; my ($note, $info, $features,$count); my ($c,$d); my @seq; my $in_seq = 0; my $seq = ''; while () { my $line = $_; if ($line =~ /(FEATURES)\s+(\w+)/) { $features = $2; } if ($line =~ /(COUNT)\s+(\d+)/) { $count = $2; } if ($line =~ /^ORIGIN/) { # print "$line\n"; push @seq, "$line\n"; } until ($line =~ /\/\/) {}; } print "@seq\n";