in reply to sort messes up data
Hi,
in the sort code block $a and $b are always two elements of the list to sort. So in your case the comparsion should be something like:
@SortedList = sort { $a->[0] <=> $b->[0] } @List;
Regards
McA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sort messes up data
by JanLaloux (Novice) on Sep 08, 2014 at 09:11 UTC |