in reply to Re: sort hash keys as numbers and maybe even more...
in thread sort hash keys as numbers and maybe even more...
What order to sort keys in when listing them? Well, each and keys doesn't have any kind of order to it in the first place. If you want an order, use sort. The block argument to sort specifies the algorithm to use. The default ordering is string cmp, and that has nothing to do with hashes. That's just what you get if you sort keys.
—John
|
|---|