in reply to Perl string matching pl
if ($searchThisLine =~ m/$searchArg/i)
If you only want to match lower-case pl, use: m/$searchArg/