For the non-numeric sort, replace <=> with cmp.@sorted_array = map {$_ -> [0]} sort {$a -> [1] <=> $b -> [1]} map {[$_ => (split /$delim/ => $_) [$key]]} @$array_2_ +sort_ref;
You are mistaken however that ST allows more complex sorting. There's nothing ST can sort that you can't sort with a non-ST method. ST can be more efficient though. However, a GRT often beats an ST when it comes to efficiency.
Abigail
In reply to Re: Improving sorts using ST
by Abigail-II
in thread Improving sorts using ST
by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |