in reply to Choosing the sort routine on the fly
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Choosing the sort routine on the fly
by Skeeve (Parson) on Sep 08, 2006 at 23:26 UTC |