Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Sorting an array of records

by tlm (Prior)
on Aug 30, 2005 at 18:19 UTC ( [id://487888]=note: print w/replies, xml ) Need Help??


in reply to Sorting an array of records

ikegami already answered your question, but as a comment on style, in this case I think this would be easier to read:

my @sort2 = sort { $a->{ salary } <=> $b->{ salary } } @workers;

the lowliest monk

Replies are listed 'Best First'.
Re^2: Sorting an array of records
by fruitbeeriswrong (Initiate) on Aug 30, 2005 at 18:30 UTC
    Thanks, your code snippet works a treat.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2025-06-20 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.