sub f { my $txt = join('', sort(split //,shift)); $txt =~ s/(.)\1+/$1/g; return length($txt); }
In reply to Re: number of unique characters in a string
by tall_man
in thread number of unique characters in a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |