newbie question - handling email addresses

2008-05-14 Thread Munzilla
Hi, I'm 100% new to Perl but I've been given a project with it anyway,
so I have some pretty basic questions.
The script is used to process a form submitted in PHP.  I have it
working fine, but I need to add an email address field now.  i was
told that Perl doesn't like the @ character (which makes sense), and
I know that I could use the backslash, but does Perl treat the
submitted field as an object, or will I have to add some functionality
which adds the backslashes before the form is submitted to the Perl?
Basically, do I need to even worry about the @ symbol if I'm working
with the submitted form fields in Perl, or will the @ still crash the
script?
Thanks.
Munz


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: newbie question - handling email addresses

2008-05-14 Thread Gunnar Hjalmarsson

Munzilla wrote:

i was told that Perl doesn't like the @ character


Then you were told wrong.

What you need to take into account is that the '@' character in a double 
quoted string needs to be escaped, or else Perl tries to interpret it as 
the start of an array variable.


As regards data from a form submission, the '@' character does not need 
any special treatment.


--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: newbie question - handling email addresses

2008-05-14 Thread Munzilla
Great, thanks.  I had hoped that was the case.

On May 14, 11:33 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
 Munzilla wrote:
  i was told that Perl doesn't like the @ character

 Then you were told wrong.

 What you need to take into account is that the '@' character in a double
 quoted string needs to be escaped, or else Perl tries to interpret it as
 the start of an array variable.

 As regards data from a form submission, the '@' character does not need
 any special treatment.

 --
 Gunnar Hjalmarsson
 Email:http://www.gunnar.cc/cgi-bin/contact.pl


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/