in reply to How to find number of unique elemenst in array

The solution offered by ikegami is really the Right Thing here, but - just to be silly -

#!/usr/bin/perl -wl use strict; my @a; $a[ord($_)-65]++ for <DATA>; print "There are $a[$_] element(s) of ", chr($_+65) for 0..$#a; __DATA__ A B C D A B A C A D

--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf