Simply put \Q and \E around $input. Like so:
m/(\Q$input\E)/
Don't do this:
m/\Q($input)\E/
Because the regex will also try to match the parenthesis.
Sarah
Update: I never said I was fast.
In reply to Re: Problems with matching and metacharacters
by WebHick
in thread Problems with matching and metacharacters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |