in reply to Re^2: Adding data to hashes & comparing
in thread Adding data to hashes & comparing
For instance, I want to compare IP's in the get and post arrays to see if there are any matches
Then it would make sense to store it in a hash of hashes, with the IP as the key. Then the searching for common IPs is as simple as iterating over the keys of the first hash, and look them op in the second hash (which doesn't require another iteration). See for example perlfaq4, "How can I get the unique keys from two hashes?" for inspiration.
|
|---|