Sombrerero_loco has asked for the wisdom of the Perl Monks concerning the following question:
Hi again.
I have the next hash:
%name {11} {key2} {key2} {key2} {2} {key2} {10} {key2} {1} {key2} {key2} {5} {key2} {key2}This its the order the data has been stored in my hash. After that using this code:
foreach $ctrl_2 (sort keys (%final)) { print "level-> $ctrl_2\n";}the script returns to me the next output:
level-> 1 level-> 10 level-> 11 level-> 2 level-> 5You dont think this its really weird? i think its something related to how perl do this function...but i think also there's another way to fix this. Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: something weird in this hash sorting
by borisz (Canon) on Jan 15, 2009 at 11:57 UTC | |
by Sombrerero_loco (Beadle) on Jan 15, 2009 at 12:08 UTC | |
Re: something weird in this hash sorting
by johngg (Canon) on Jan 15, 2009 at 11:56 UTC | |
Re: something weird in this hash sorting
by Bloodnok (Vicar) on Jan 15, 2009 at 17:27 UTC |
Back to
Seekers of Perl Wisdom