But the real problem lies in how you declare $string, that is, the @ sign must be escaped if you use double quotes:s/@/\/@/g;
UPDATE:$string = "foo\@bar.com"; # or better yet: $string = 'foo@bar.com';
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
In reply to (jeffa) Re: Search and replace for @
by jeffa
in thread Search and replace for @
by P0w3rK!d
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |