How to determine if a string contains a character in perl 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";
}