in reply to Splitting on change

my $t = 0; my @x = grep $t^=1, split /(?<=(.))(?!\1)/, $x;
my @x; push(@x, $1) while $x =~ /((.)\2*)/g;
my $t = 0; my @x = grep $t^=1, $x =~ /((.)\2*)/g;
my $t = 0; my @x = grep $t^=1, map /((.)\2*)/g, $x;

$t is for "toggle". grep is used to filter out every second item.