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
In reply to Re: sort messes up data
by McA
in thread sort messes up data
by JanLaloux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |