in reply to Perl Matching Question

You could try to use the external program grep(assume that you are working on unix platform). Then just do this:

$result = `/usr/xpg4/bin/grep -e PASS -e sweeps -e Final -q $filename` +;
if the result is empty, then the file does not contain the patterns you are looking for. Otherwise, it will return non-empty. The -q option will short circuit the grep so that grep will quit after the first match, this will improve the performance of grep.