Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: hash map to give preference to 1st match

by choroba (Cardinal)
on Jun 23, 2011 at 10:50 UTC ( #911054=note: print w/replies, xml ) Need Help??

in reply to hash map to give preference to 1st match

Using the name "value" for a key is confusing, try to change it to something else (float?).
Hash variable cannot be used with round brackets (%result()).
Are you sure you store the whole list of the URL's into your values (i.e. you use Hash of Arrays, HoA)? If yes, just use $result{$float}[0] to retrieve the first value. Do not you overwrite an older value with a new one when storing the values?

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2023-12-02 05:27 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (13 votes). Check out past polls.