string addslashes(string str)
Escapes single quote, double quotes and backslash characters in a string with backslashes
which you can do with:
$string =~s/(['"\\])/\\$1/g;
--------------------------------------------------------------
"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
John Brunner, "The Shockwave Rider".
In reply to Re: escaping special charcters from a string
by g0n
in thread escaping special charcters from a string
by bar10der
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |