in reply to Comparing two columns

You can use the native unix sort and comm commands if you have the column data in separate files.

e.g. file1 contains column1, file2 contains column2 data, type the following on the command line.

sort file1 > file1.sorted sort file2 > file2.sorted comm -12 file1.sorted file2.sorted | sort | uniq > result.txt
The result.txt file contains the values that are present in both files. (we remove the repeating lines with the sort and uniq) or you can use it inside the program, like this
system ("sort file2 > file2.sorted"); system ("sort file1 > file1.sorted"); my $result = `comm -12 file1.sorted file2.sorted | sort | uniq`;
Now the $result contains the identifiers that are common to both files but are not repeated.

perliff

----------------------

-with perl on my side