You can use the \Q and \E pair of escape sequences to stop and restart interpretation regular expression metacharacters. So you could have something like:
$string =~ /\Q|123456|john+\E/;
/J\
In reply to Re: escape all special characters???
by gellyfish
in thread escape all special characters???
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |