I have a list of email addresses (firstname.lastname@example.org) 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:
$$email = join('\@', split("@",$$email));
Where $$email is the email address. When I do the above, it actually replaced "@" with "\\@", I've tried:
$$email = join("\\\@", split("@",$$email));
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.
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.