Subject: | Does not sort well first two items of the result list |
First array:
my @array1 = ( 11, 21, 7, 26, 17, 2, 22, 1, 18, 23, 16, 13, 27, 25, 6, 28, 3, 9, 12, 20, 14, 15, 8, 4, 24, 19, 10, 5);
my @array2 = ( 26 );
my $lc = List::Compare->new( {
lists => [ \@array1, \@array2 ],
unsorted => 1
});
my @newarray = $lc->get_symdiff;
print join(", ", @newarray);
RESULT:
First array was:
11, 21, 7, 26, 17, 2, 22, 1, 18, 23, 16, 13, 27, 25, 6, 28, 3, 9, 12, 20, 14, 15, 8, 4, 24, 19, 10, 5<
array2 was = ( 26 );
RESULT not correctly sorted:
11, 21, 7, 2, 17, 22, 1, 18, 13, 16, 23, 27, 25, 6, 28, 3, 9, 12, 15, 14, 20, 8, 4, 24, 10, 19, 5
Instead of 17,2 after 7, it gives 2, 17 after 7, the rest is orderly sorted