Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Sorting an Associative Array?

by target (Beadle)
on Jul 13, 2000 at 22:57 UTC ( [id://22435]=note: print w/replies, xml ) Need Help??


in reply to Sorting an Associative Array?

In case anyone has an opinion :) here is how I completed the code. Probably not the best way, but it works for what I want. I installed the following lines before the orignal snippet I sent.
for $i (0 .. $#origarray) { push @temparray, $origarray[$i][4]; } @sorted = @origarray[ sort { $temparray[$b] cmp $temparray[$a] } 0 .. +$#temparray ];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-28 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found