If you wish to use that syntax, you could use a wrapper.
sub mysort { my $sorter = shift; return sort $sorter @_; } my @sorted = mysort sorthash_alpha('foo'), @list;
In reply to Re^3: Is it possible to sort using a coderef, without first storing the coderef in a scalar
by ikegami
in thread Is it possible to sort using a coderef, without first storing the coderef in a scalar
by imp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |