This is my attempt:
...and it doesn't work. Trawling through man perlre mentions this but I don't understand the solution:if ($source =~ /'\$/s) { push @errors, "possible unescaped sql string"; }
You cannot include a literal $ or @ within a \Q sequence. An unescaped $ or @ interpolates the corresponding variable, while escaping will cause the literal string \$ to be matched. You'll need to write something like m/\Quser\E\@\Qhost/.What is the secret?
Thanks
Steve Woodcock
In reply to How can I match '$ (literally) by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |