Is this correct? I need to run GREP to check file(s) for some text and if I 
find a match then execute my code.

my $file = 'input.file';

if (grep(/FIND MATCH/i, $file)) {

Found a match...run code

} else {

No match found

}



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to