Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 admiring the Monastery: (5)
As of 2024-04-18 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found