Hi all!
I have a file like this :
colum a colum b
uid = 1 uid = 4
uid = 2 uid = 3
uid = 3 uid = 2
uid = 4 uid = 1
I'm trying to find those columns with the same numbers regardless the colum
they are. That's, in the example, the row 2 is identital to row 3.
So far, I have tried:
my %seen_pair;
while (my $line = <IN> ){
chomp $line;
my ($col_1, $col_2) = split (/\t/,$line);
if ($seen_pair{$col_1 }{$col_2} || $seen_pair{ $col_2 }{$col_1}
){
print "Pair already seen: $col_1\t$col_2\n";
next;
}
}
But I thinks it's wrong.
Thank you in advance.
--
Jordi