in reply to Re: Sorting result of function call
in thread Sorting result of function call

It's a bit ambiguous actually - should "sort subname" be interpreted as "using this sub as the sort comparison routine, sort the empty list" or "call this sub in list context and sort the results with the default sort comparator".

Maybe I'm misunderstanding you here, but "sort subname" is my first testcase and it neither behaves as your first alternative nor as your second!

-- Hofmator

Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.