in reply to Sorting an array by dates in a field...
Note the order of $a, $b since you wanted oldest first, i.e., descending sort.while <FH> { my @$record = split $delimiter, $_; push(@unsorted, $record); } @sorted = sort { $b->[0] cmp $a->[0] } @unsorted;
|
|---|