Check out example codes for "Perl search if variable contains word". It will help you in understanding the concepts better.

Code Example 1

if (index($str, $substr) != -1) {
    print "$str contains $substr\n";
}

Learn ReactJs, React Native from akashmittal.com