Probably not as good as the split solution but perhaps a little easier to read if you recognise the idiom:
@arr = $string =~ m/(.*?[KR])(?!P)/gs;
In reply to Re^2: cleaving a sequence with specific alphabets
by tachyon-II
in thread cleaving a sequence with specific alphabets
by heidi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |