sub f { my $txt = join('', sort(split //,shift)); $txt =~ tr/\x00-\xff//s; return length($txt); }