sort returns a list.
\LIST (for example, \($x,$y,42) ) creates another list containing links to each element of the original list (\$x,\$y,\42) .
So, \sort ... returns links to items in a sorted list.
Now in a scalar context, $foo = LIST assigns the last element of the list. Introducing this at all,
my $y = \sort qw(one two three four five);
assigns a link to the last sorted item on $y or
print $$y;
I cannot come up with any good use cases for this function, but this is not very good evidence that this does not exist.
source share