in reply to Sorting on a split hash value
...which will sort your hash by the first value in the double-colon-separated 'thing' that's stored in your hash. Should you also need to keep track of the key, this example can be modified to suit that purpose.@sorted = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, /^([^:]+)::/ ] } values %games
HTH,
thor
|
|---|