Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Trimming hash based on element uniqueness

by injunjoel (Priest)
on Jun 17, 2008 at 21:47 UTC ( #692595=note: print w/replies, xml ) Need Help??

in reply to Trimming hash based on element uniqueness

Greetings, you might try making the keys of your hash the query, or perhaps a hash of references to your data with the query as the key, that way you can't have duplicates (like an pseudo-index of your larger structure where each element is a reference to the actual data, keyed of course by the query). The point is to construct a key that will collapse your slight variants of your queries, while still being distinct enough to not collapse everything. Have a look at The Uniqueness of hashes. if you have time.

"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo
  • Comment on Re: Trimming hash based on element uniqueness

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2020-09-20 08:34 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (120 votes). Check out past polls.