in reply to Sort: By keys, values, and their returning values.
In (#3) you are not sorting the hash, you are sorting the values in the hash and discarding the keys. This gets you a sorted value list (which may be all you want, depending on the application)
In (#4) you are passing the sort function the values in the hash and trying to use them like keys. (again, discarding the actual keys). Hopefully it is obvious now that this will not do anything useful.
-Greg
|
|---|