while () { if (/^>/) { $in_sequence = 1; next; } $dna .= $_ if $in_sequence; } }