Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to find number of unique elemenst in array

by Corion (Patriarch)
on Nov 27, 2008 at 19:35 UTC ( [id://726471]=note: print w/replies, xml ) Need Help??


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

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.

  • Comment on Re: How to find number of unique elemenst in array

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://726471]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found