my $v1 = substr($match, 0, 1); my $v2 = substr($match, 1, 1); next if ($match =~ /^($v1$v2){2,}$/);