in reply to Is it possible to sort using a coderef, without first storing the coderef in a scalar
No. sort has a weird prototype. As documented, the first argument can be a block, a bareword (which is treated as a function name), or a scalar (which contains a function name or a function reference). No other expressions are not allowed, so a function call will not work.
|
|---|