#!/usr/bin/perl use strict; my $subtract_file = shift; my %subtract; open(FH, "<$subtract_file") or die "unable to open file ($subtract_file): $!"; while () { chomp; $subtract{lc($_)} = 1; } close(FH); while () { chomp; print "$_\n" if ( ! exists $subtract{lc($_)} ); }