Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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
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 pondering the Monastery: (14)
As of 2014-12-22 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (119 votes), past polls