in reply to Perl Matching Question

Replace your comment block with something like

while( <FILE> ) { print "Found $1 in $file; line $. :offset $-[0]" if /(PASS)/ or /(sweeps)/ or /(Final)/; }

You don't say what you want to do if you find a match, or whether a match means you found any of your three words or all of your three words. The above will do the former but breaking the if into 3, setting a flag for each and taking some action (like leaving the loop early) if all 3 flags are set would be one way to do the later.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.