http://qs321.pair.com?node_id=629349


in reply to Re^2: Split a string based on change of character
in thread Split a string based on change of character

As you might expect, I was tempted to (ab)use the magical $| flip-flop variable:

my @words = grep --$|, split /(?<=(.))(?!\1)/, $string;
but was able to restrain myself. :-)