sub splitSameChars { for( shift @_ ) { push @_, $1 while /((.)\2*)/g; } @_; }