in reply to How to sort an array of hashes based on one of the values in the hash?
############################################## # Wrong! (thanks tobylink) #@AoH = sort { $a->{Son} <=> $b->{Son} } @AoH; # Correct. @AoH = sort { $a->{Son} cmp $b->{Son} } @AoH;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to sort an array of hashes based on one of the values in the hash?
by tobyink (Canon) on Mar 08, 2013 at 15:49 UTC | |
by blue_cowdawg (Monsignor) on Mar 08, 2013 at 16:34 UTC |