I'm attempting to find certain keywords inside a perl script. For some reason my Regex wont find keywords followed by a ; and I believe \n
For example if I was searching for the word "print" the below code would find print if the string contained
print ;
but wouldn't if it was
print;
My current code:
$keyword = "print";
if($string =~/\b$keyword\b/g)
{
print "found";
}