The simplest way would be to use the \Q and \E in the expression:
and it will do the right thing.$re= qr(/($<!\Q$a\E)\Q$b/);
/J\
In reply to Re: Maybe Escape in Dynamic RegExps
by gellyfish
in thread Maybe Escape in Dynamic RegExps
by stefan k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |