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:
but was able to restrain myself. :-)my @words = grep --$|, split /(?<=(.))(?!\1)/, $string;
In Section
Seekers of Perl Wisdom