Well, just chain a map-based solution like "mine" with the usual grep-based "uniq" or absorb the latter into the map():
my %saw; my @parts = map { my $s=substr $str, $_, 3; $saw{$s}++ ? () : $s } 0..length($str)-3;
In reply to Re^2: finding number of contiguous letters
by blazar
in thread finding number of contiguous letters
by Marknel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |