sub grep { my ($self,$logLines, @strings) = @_; for my $string (@strings) { if ( $logLines =~ /$string/ ) { INFO("Found $string in ipsecd.log"); } else { #return false, we cound find $string WARN("Not Found $string in ipsecd.log"); return 0; } } # found all strings in the $loglines, return true. return 1; }