in reply to sorting hash by a certain value (that it is in an array)
This is a FAQ. Please see perlfaq4 on How do I sort an array by (anything)?.