Plain old hashes can't be sorted. If you want to maintain some order, keep track of the keys in an array, and get them into whatever sorted order you wish.
Reading your code from left to right, "%hash = sort" is your first problem.
Dave
In reply to Re: Sorting a hash in one line
by davido
in thread Sorting a hash in one line
by rachitmohta11
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |