@matches = ($input =~ m/ (.{1}?) (?{ $chars{$^N}++; }) /xg);