Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Stupid, yet simple, sort question

by broquaint (Abbot)
on Oct 24, 2001 at 20:38 UTC ( #121176=note: print w/replies, xml ) Need Help??


in reply to Stupid, yet simple, sort question

This ought do the trick -
foreach $loc (reverse sort { int(${$a}{online}) <=> int(${$b}{online}) + } @locations)

HTH

broquaint

Update: And if I look the at code a little closer, it may even work (dereferenced the info we want, thanks davorg)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://121176]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2018-05-25 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?