in reply to How do you sort keys of a hash in descending order and print 3 per line?
Your program doesn't compile as posted. You have an undeclared variable in there.
Your main problem is that you have nested for loops that cause the program to print each name the number of times there are items in the list. You need to consolidate the two things you are doing in loops so that you only loop through the names once, using the same loop for your counter.
Hope this helps!
|
|---|