in reply to cleaving a sequence with specific alphabets
If I understood your question clearly, here is my solution. You can use negative look behind regex and split function to accomplsh it. TIMTOWTDI.
$string = 'APADPKGSTIDRPDAARTLTVHKCEQTDTRGVKEGTRNEDPQAECKPVSDVEFTITKLN +VD'; @arr = split /(?<!P)(K|R)/, $string; print @arr; output: ------- APADPKGSTIDRPDAARTLTVHKCEQTDTRGVKEGTRNEDPQAECKPVSDVEFTITKLNVD
Take a look at perlre and split function.
Prasad
|
---|
In Section
Seekers of Perl Wisdom