It's a bit kludgey, but it works.my $s = $sorter->[$offset]; print "$_\n" for sort $s @list;
Also, I had to remove the prototypes from forward and backward to get them to work; according to sort's documentation, prototypes cause the parameters to be passed in @_ instead of $a and $b.
In reply to Re: Choosing the sort routine on the fly
by sgifford
in thread Choosing the sort routine on the fly
by grinder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |