#!/usr/bin/perl use strict; my ($source_filename,$exclusion_filename) = @ARGV; # read each line of exclusion file and store as a hash-key (for quicker look-up) open EXCLUSION, "$exclusion_filename" or die "Could not open file of excluded lines: $!\n"; my %exclude = map { ($_ => 1) } ; close EXCLUSION; open SOURCE, "$source_filename" or die "Could not open source file: $!\n"; while () { print unless $exclude{$_}; } close SOURCE;