Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2018-08-19 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (186 votes). Check out past polls.

    Notices?