in reply to extract number of times a value appears in an array
The trick is to use a hash to store each value as a key and increment the hash value for each instance of the array value. Take a look at Hash Keys (strings or numbers?), Not Exactly a Hash Tutorial and The Uniqueness of hashes. in the Tutorials section for stuff on hashes.
|
|---|