Help for this page
echo 'aaabbccccdd eee' | perl -aF'(.)(?!\1)' -lne 'while(@F){push@M,sh +ift(@F).shift(@F)}print for @M'
aaa bb ... dd eee