Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: problem with array of hashes

by moritz (Cardinal)
on Oct 09, 2012 at 11:09 UTC ( #997980=note: print w/ replies, xml ) Need Help??


in reply to problem with array of hashes

Hash keys aren't ordered, so there is no getting of the "last" hash key or so.

So the question is, how do you identify which hash key you want to retrieve? If it's the key with 't' as a value, you have to iterate through the whole hash -- which likely means that the data structure is poorly chosen for you application. Also if you want to search by value, what do you do if multiple keys have the same value?

Or is there any other logic by which you identify the '41'?


Comment on Re: problem with array of hashes
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2015-08-02 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (10 votes), past polls