in reply to How do I sort on one of the fields in a dereferenced array reference?
also, sort won't work inside your for loop, as each row only has one name field. you have to sort all rows, as in my @new_array = sort { @{ $a }->[1] cmp @{ $b }->[1] } @{ $array_ref }; or something close to that.
in this example, i don't see why you're not sorting this data in the database.
|
|---|