in reply to Simple problem with @ in string.
...how can I escape it AFTER the string is already defined?
I could be wrong, but I'd say that @ char is a red herring. You only need to escape it in literal double quoted strings (as you've shown). After the string literal has been parsed by the Perl interpreter, there is no longer any \ in the value stored in the variable $emailaddress. So why should there be when you're reading the email addresses from some data source (as I understand you're doing)?
Maybe there's something else in the email addresses, like a trailing newline or some such, that is throwing off the mailer program... Try debug-printing the values like this "|$emailaddress|", or possibly using Devel::Peek, in order to figure out if there's any junk characters present.
|
|---|