in reply to Coffee time quiz

This is a faster way to count unique characters, using /s (Squash duplicate replaced characters) option of "tr":

$_ = "abcdeaacde"; $_=join ("",sort split //); tr/a-z//s; print length;

output: 5

Replies are listed 'Best First'.
Re^2: Coffee time quiz
by Aristotle (Chancellor) on Oct 22, 2002 at 21:35 UTC
    Much shorter: print scalar keys %{{map{(lc)x2} /(.)/sg}}; In a oneliner: perl -lne'print if !grep $_ != 15, length, scalar keys %{{map{(lc)x2} /(.)/sg}}' I find two words:
    • dermatoglyphics
    • uncopyrightable
    There'd probably be a few more in a larger list.

    Makeshifts last the longest.