The problem appears when I also have Ns at the beginning or end of the sequenceSo, remove the N's at the beginning and at the end, and use your old algorithm:
$sequence =~ s/^N+|N+$//g;
In reply to Re: Splitting only on internal pattern, not at start or end of string
by choroba
in thread Splitting only on internal pattern, not at start or end of string
by BiologySwede
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |