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