http://www.perlmonks.org?node_id=1064602

david2008 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, This is a crosslist from stack overflow The problem is the following
use strict; use List::MoreUtils qw/uniq/; use Data::Dumper; my @x = (3,2); my @y = (4,3); print "unique results \n"; print Dumper([uniq(@x,@y)]); print "sorted unique results\n"; print Dumper([sort uniq(@x,@y)]);
gives as output
unique results $VAR1 = [ 3, 2, 4 ]; sorted unique results $VAR1 = [ 2, 3, 3, 4 ];

Unfortunately the uniq does not work anymore.
There is an answer from amon that perl uses the sort function form where the first parameter is a function and the second a list, but i still don't understand why it does not execute uniq beforehand and then uses the sort LIST,instead of preferring the sort SUBNAME LIST form.

Amon also suggested to use
sort +uniq @letters;
What does the + mean?
Thanks,
David