in reply to Re^6: Sorting an array of hashes with an exeption
in thread Sorting an array of hashes with an exception
ID => 1, Distance => 10, RouteDistance => 1, ID => 2, Distance => 9, RouteDistance => 0, ID => 3, Distance => 8, RouteDistance => 2,
According to your logic, ID1 < ID3 (1<2), but ID3 < ID2 (8<9) and ID2 < ID1 (9<10), therefore ID3 < ID1. Your order is not transitive.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Sorting an array of hashes with an exeption
by martin_87 (Initiate) on May 10, 2013 at 17:47 UTC |