If you have a brief alphabet (intimated by your earlier example using just actg), this is easy:
print join " ", "aaabbcddddaee" =~ /(a+|b+|c+|d+|e+)/g

In reply to Re: Puzzlement in Splitsville by ysth
in thread Puzzlement in Splitsville by tlm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":