Gossamer Forum
Home : General : Perl Programming :

Saving a mail-address in a file ... please help!

Quote Reply
Saving a mail-address in a file ... please help!
Newbie needs help!

If i use anything like this:

$mail_address = 'myemail@mysite.com';

in a form and i'd like to save it into a textfile like this:

$mail_address = 'myemail\@mysite.com';

how do i insert the backshlash into the mail-address?

Chef

Quote Reply
Re: Saving a mail-address in a file ... please help! In reply to
Try;

$new_email = "$oldemailaddress";
$new_email =~ s/\@/\\\@/g;

Then save $new_email to the file.

Hope this helps


Andy

http://www.ace-installer.com
webmaster@Ace-installer.com
Quote Reply
Re: Saving a mail-address in a file ... please help! In reply to
Yep - thanx!