$ perl -e 'open F,$ARGV[0] or die;shift;my %set = map {$_ => 1 } <>; for () {print unless $set{$_}};' A B apple cherry carrot