On Monday, April 15, 2002, at 08:58  PM, Daniel Falkenberg wrote:

> Hello All,
>
> How would I go about checking to see if a variable contains an @ symbol?
>
> $email = "[EMAIL PROTECTED]";
>
> if ($email ne "@" || $email eq "") {
>  print "Please make sure your type your email address in correctly";
> } else {
>   print "All is OK";
> }
>
> Thx,
>
> Dan

well, i got the sense wrong on my original answer.
try
if ( !($email=~/@/) or $email eq '')
....

regilar expressions are an important part of perl. you might want to look 
into it.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to