#!/usr/bin/perl # # use strict; use warnings; my $file1 = shift; my $file2 = shift; my $match = 0; open(IN, "<", $file2) or die "Cannot open file $file2 $!\n"; while(){ chomp($_); my $s_line = $_; open(INPUT, "<", $file1) or die "Cannot open file $file1 $!\n"; while(){ chomp($_); my $str = $_; if($s_line =~ /$str/){ $match = 1; } } close(INPUT); if($match == 0){ print "$s_line\n"; } $match = 0; } close(IN);