http://qs321.pair.com?node_id=239632

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

OK, I have a nice, easy question that will let you show off your cleverness (I could do this easily by brute force, but I want some efficiency, as I will have to do it thousands of times).

I have some random strings (actually hex strings, but I would like to see a more general case). I want to find the number of unique characters in the string.

f(0101010101) should return 2
f(1234567812) should return 8