c:\@Work\Perl\monks\Sidd@786>dir do.txt Volume in drive C is Acer Volume Serial Number is 9840-785B Directory of c:\@Work\Perl\monks\Sidd@786 File Not Found c:\@Work\Perl\monks\Sidd@786>perl #use strict; use warnings; $file1 = 'goodfile.txt'; $file2 = 'badfile.txt'; open $h2, '<', $file2 or die "cannot open file2"; @a2 = <$h2>; close $h2; chomp @a2; $match = join '|', @a2; $match = qr/$match/; open $f3,'>',"do.txt" or die "$!"; open $h1, '<', $file1 or die "cannot open file1"; my @a1 = <$h1>; close $h1; # print grep {$_ !~ $match} @a1; print $f3 grep {$_ !~ $match} @a1; __END__ c:\@Work\Perl\monks\Sidd@786>cat do.txt don't you