In addition to putting a backslash before the at-sign ("@"), if you are
going to do any further manipulation in Perl, you may need backslashes ahead
of the periods ("."). Try
print LOGFILE "\$ADMIN_EMAIL=\"\Q$ADMIN_EMAIL\E\";\n";
and see what happens.... Note the \Q and \E (both uppercase) in the string.
(\Q starts the quotemeta function.)
LOGFILE will now have
Until your books arrive, you can use the built-in documentation that should
have come with your Perl distribution, or (on the web):
Hope this helps....
> -----Original Message-----
> From: Franki [mailto:frankieh@...]
> Sent: Friday, January 05, 2001 9:13 AM
> To: email@example.com
> Subject: RE: [PBML] Dumb Question that is driving me nuts. explain ??
> I have been playing with this for ages, and I can't seem to get
> print LOGFILE "\$ADMIN_EMAIL=\"$ADMIN_EMAIL\";\n";
> which basically prints out the scalar
> (the email address is an example obviously.)
> I need it to add a \ in front of the @
> And because my perl books haven't been delivered, I am
> forever trying stuff
> till it works, but this isn't.
> I need $ADMIN_EMAIL="franki\@..." to be the result,
> basically I
> need the value of $ADMIN_EMAIL (which is always an email
> address) to have
> the @ replaced with \@
> I get errors with everything I try. :(
> Can anyone spare a sec or two to help me out?