in reply to Re: Sort by what?
in thread Sort by what?
will work, where $var can be given either the name of the subroutine or a reference to it. If validation of the sub name is necessary, it ought to be done separately from the call to sort.$var = 'by_title'; # or $var = \&by_title; sort $var @array;
|
|---|