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

Re: something weird in this hash sorting

by borisz (Canon)
on Jan 15, 2009 at 11:57 UTC ( #736523=note: print w/ replies, xml ) Need Help??


in reply to something weird in this hash sorting

you must sort the keys numerical. try:

for my $ctrl_2 ( sort { $b <=> $a } keys (%final) ){ ... }
and read perldoc -f sort for more information.
Boris


Comment on Re: something weird in this hash sorting
Download Code
Replies are listed 'Best First'.
Re^2: something weird in this hash sorting
by Sombrerero_loco (Sexton) on Jan 15, 2009 at 12:08 UTC
    Hi boris. Thanks it works. also thanks to everybody. cheers

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2015-07-29 09:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls