in reply to Re^4: Split a string based on change of character
in thread Split a string based on change of character
I think ikegami meant $i^=1, i.e.:
which does work.my @words = grep $i^=1, split /(?<=(.))(?!\1)/, $string;
|
---|
In Section
Seekers of Perl Wisdom