It works perfectly, but I don't quite follow this line...
printf "%d: %s, %s\n", ++$n, $_, $cities{ $_ } for @sorted;
In reply to Re^2: sorting hash alphabetically with numbering
by reebee3
in thread sorting hash alphabetically with numbering
by reebee3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |