perl check if string contains code example
Example: Perl search if variable contains word
if (index($str, $substr) != -1) {
print "$str contains $substr\n";
}
if (index($str, $substr) != -1) {
print "$str contains $substr\n";
}