...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
In reply to Re: Sorting on a split hash value
by thor
in thread Sorting on a split hash value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |