I have a list of email addresses (user@company.com) in a configuration file, what I need to do is replace the "@" with "\@". I've tried regexp but couldn't get it to work, so I'm trying this:
Where $$email[0] is the email address. When I do the above, it actually replaced "@" with "\\@", I've tried:$$email[0] = join('\@', split("@",$$email[0]));
and that doesn't work either. It substitutes "@" with "\\\@". This should be something simple to do, I just can't get a handle on it.$$email[0] = join("\\\@", split("@",$$email[0]));
Well, thanks all. All solutions worked, and I actually had it working myself, but because I was printing out my hash table of email addresses using "Dumper" it must have automatically substituted "\@" with "\\@", but if I just print out a single hash element, it looks fine. Urgh ! I just didn't realize the output from using Dumper, looks slightly different. Hate when I do stuff like that.
In reply to Having a problem replacing "@" with "\@" by TASdvlper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |