#!/usr/bin/perl -w
use strict;

# To quick a script to write a description about
#
# Used for finding missing chromatograms for the potato inventory
# Usage: <file1> <file2>
#
# Files are lists of items. Items in <file1> that are not in <file2> are
# outputed.
#
# Reverse comparison is not performed.

my $file1 = shift;
my $file2 = shift;

open F, "<$file1"
  or die "Failed to open file \"$file1\" ($!)";

my %list1 = ();
while(<F>) {
  chomp;

  $list1{$_} = 1;
}

close F;

open F, "<$file2"
  or die "Failed to open file \"$file2\" ($!)";

my %list2 = ();
while(<F>) {
  chomp;

  $list2{$_} = 1;
}

close F;

foreach ( keys %list1 ) {
  next if ($list2{$_});
  print "$_\n";
}









