Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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

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 drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-10-01 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (8 votes). Check out past polls.