in reply to help with an array of arrays
Remove the inner loop. Since you already know the max number, you only need to loop through the outer array once, looking for ones that match the max number.
In Section
Seekers of Perl Wisdom
in reply to help with an array of arrays