Or get slower lexical variables for $a and $b by providing a prototyping your comparison function and creating my variables to store them in.
From perlfunc(1):
sort SUBNAME LIST sort BLOCK LIST sort LIST Sorts the LIST and returns the sorted list value. ... If the subroutine's prototype is "($$)", the ele ments to be compared are passed by reference in "@_", as for a normal subroutine. This is slower than unprototyped subroutines, where the elements to be compared are passed into the subroutine as the package global variables $a and $b (see exam ple below).
In reply to Re: Re: Problem with Schwartzian Transform nested in another sort from a different package
by sgifford
in thread Problem with Schwartzian Transform nested in another sort from a different package
by ronald
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |