
andy7t
User
Sep 28, 2003, 3:44 AM
Post #1 of 3
(370 views)
|
|
Sorting 2 Hashes
|
Can't Post
|
|
Hi, Another football question i'm afraid. Daveorg told me to sort hashes like this: foreach (sort { $points{$b} <=> $points{$a} } keys %points) { } This works fine- but my next problem is how do i do two sorts? I need to sort not only by points, but also by goaldifference ($goaldifference) So, i need it to first sort it into Points, and if there is more than one team with the same amount of points, then sort by goaldifference. Thanks Andrew
|