Welcome to the Monastery | |
PerlMonks |
Sorting an hash of an array by a value in the arrayby Anonymous Monk |
on Jan 12, 2012 at 15:09 UTC ( [id://947551]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: Hi, I've had a search for this and if I've read the answer anywhere I haven't recognised it as such. I want to sort a hash by its value...but its value is an array. I want to use the first element in that array for sorting. i.e. to sort a hash by $hash{$key}[0] It's possible that this is a stupid thing to do and that's why I can't find anything on it. Anyway, thanks for reading. MorayJ
Back to
Seekers of Perl Wisdom
|
|