Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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.

-InjunJoel

"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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-07-13 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (242 votes), past polls