in reply to Re: hash sorting/alphabetization issue : country postal codes
in thread hash sorting/alphabetization issue : country postal codes
my @sorted_keys = sort { $country_names{$a} cmp $country_names{$b} } k +eys %country_names;
Considering that in the end you would have sorted VALUES not the keys, above array variable name is rather misleading.
Correction. Afer grep's reply below, I saw that what was misleading was my claim made above. The array name was reasonable; it was my fault for forgetting that sort sorted the LIST based on result of BLOCK.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: hash sorting/alphabetization issue : country postal codes
by grep (Monsignor) on Jul 03, 2007 at 21:36 UTC | |
by parv (Parson) on Jul 04, 2007 at 04:43 UTC |