If you want to use split, you need to apply lookbehind and lookahead assertions in the regex, to keep the letters A, G, C and T out of the match:
(Waiting for AnomalousMonks expert answer...)my @info = split /(?<=[ATGC])N+(?=[ATGC])/, $line;
In reply to Re^4: Splitting only on internal pattern, not at start or end of string
by hdb
in thread Splitting only on internal pattern, not at start or end of string
by BiologySwede
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |