For completeness, the code below was the final solution. This solution circumvents the problematic nuance that kennethk explained.
if ($line5 =~ m!(\\|\b)\Q$your_item\E(\\|\b)!i) { ... }
Thanks again
In reply to Re^2: regex not matching special char
by mnooning
in thread regex not matching special char
by mnooning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |