in reply to Re: Sorting on identical valuesin thread Sorting on identical values
perldoc -q "How do I sort an array by (anything)?" [download]