I have a hash of arrays that looks like this:
{ $key, [$val1, $val2] }
I'm trying to numerically sort by the second value of the array and print out the entire hash. I've taken a look at the Schwartzian Transform posts, but I haven't seen one that does exactly what I want. I'm also very confused by the syntax and how to map the sorted values back into the original {$key, [$val1, $val2] }
form. Any help would be appreciated!
$hash->{ $key }[1]
. You do not need a Schwartzian transform. – Axeman