Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Sorting an Associative Array?

by target (Beadle)
on Jul 13, 2000 at 22:57 UTC ( #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? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-08-11 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?