If u want to this by the explicitly instead of using the quatemeta just add the character you want to prefix with the "\" in the substitute.
while(<>){ $_=~ s/([\$|\||\[|\)|\\|\/|\(])/\\$1/g; print; }
In reply to Re: Regex help
by vinoth.ree
in thread Regex help
by bingohighway
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |