##
my $output_pipe = "|sort -n -t, -k3,4 -u > $tmpfile";
####
$ cat test.dat
1,1
1,2
1,3
2,1
2,4
2,2
2,1
1,1
####
$ sort -n -t, -k1,2 test.dat | uniq
1,1
1,2
1,3
2,1
2,2
2,4
That's good.
####
$ sort -n -t, -k1,2 -u test.dat
1,1
2,1
Not what I expected.