The stupid question is the question not asked | |
PerlMonks |
Re: How to find number of unique elemenst in arrayby Corion (Patriarch) |
on Nov 27, 2008 at 19:35 UTC ( [id://726471]=note: print w/replies, xml ) | Need Help?? |
This sounds a lot like homework to me. But there is one rule of thumb in Perl - whenever you think of "unique", think "hash". Using a hash, with the array elements as keys and the count as values will give you an easy solution to your problem. Now all you have to do is write the code.
In Section
Seekers of Perl Wisdom
|
|