For the following code:
use warnings;
use strict;
use Acme::Tools;
my @vals1 = ('a', 'dup');
my @vals2 = ('z', 'dup');
my @new_values = sort uniq (@vals1, @vals2);
print "VALUES:@new_values\n";
I get the following output:
VALUES:a dup z dup
If I replace sort uniq with distinct (obviously the better coding style), then I get the expected result:
VALUES:a dup z
What would cause this? Is there some strange interaction between sort and the argument template for uniq?
For the following code:
I get the following output:
VALUES:a dup z dupIf I replace
sort uniqwithdistinct(obviously the better coding style), then I get the expected result:VALUES:a dup zWhat would cause this? Is there some strange interaction between
sortand the argument template foruniq?