I have two files, A and B. I need to output only those individuals **not** in file B, the unique lines in file A.

File A looks like:

```
SNP CHR GeneticDistance BP P
rs1043096 1 0.000000 111682307 1.6478397881920986E-06
rs6661407 1 0.000000 230654589 6.5655676421792970E-06
rs1822312 1 0.000000 146687250 6.9190273469706007E-06
rs7533254 1 0.000000 34181830 1.8066585187932294E-05
rs1414355 1 0.000000 89828716 2.0823984140492505E-05
rs237425 1 0.000000 94012287 4.3816651855534701E-05

```

File B looks like:

```
rs1043096
rs1822312

```

And the output would like:

```
SNP CHR GeneticDistance BP P
rs6661407 1 0.000000 230654589 6.5655676421792970E-06
rs7533254 1 0.000000 34181830 1.8066585187932294E-05
rs1414355 1 0.000000 89828716 2.0823984140492505E-05
rs237425 1 0.000000 94012287 4.3816651855534701E-05

```

I don't even know where to begin, and I don't know what language to use! I presumably can't use a !=in regexp or I'll get everything else in the file that doesn't match line by line, rather than just the lines unique to file A

Can I modify something like this? sort fileA fileB | uniq -u > fileC

Or this? I'm finding it tricky because the lines in file A and B don't look identical anyway.

```
open(FILE1, "< fileA.txt");
open(FILE2, "< fileB.txt");

@file1 = <FILE1>;
@file2 = <FILE2>;

foreach $line (@file1, @file2)
{
    chomp($line);
    $TEXT{$line}++;
}

foreach $line (sort keys %TEXT)
{
    if ($TEXT{$line} == 1)
    {
         print $line . "\n";
    }
}

```

Thanks!