Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Sort and Access Math::Currency Objects

by PerlSufi (Friar)
on Aug 15, 2014 at 16:32 UTC ( [id://1097584]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Sort and Access Math::Currency Objects
in thread Sort and Access Array of Hash

kennethk, I was getting 'Not a Hash Reference' with that sort method, I have updated my code with a sample data structure. Sorry again. UPDATE: With your method slightly modified, I got it:
my ($lowest) = sort {$products_and_prices->{$a} <=> $products_and_pric +es->{$b}} keys @{$products_and_prices}[0];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-19 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found