[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl Question



Forgive mine drunken rambling, but could you not append the line to check
for something akin to a .foo in a@b.foo by doing this?

/.+\@.+\..+/

Sorry if it doesn't work, our party here is getting out of hand.  I am
already wearing the sombrero of tequila immunity.  :)

TIghe

>I have a perl script with a line
>
>  &sorry('be') unless ($form{'EMAIL'} =~ /.+\@.+/);
>
>I know that this appears to be unsafe... as a matter of fact, something like
>mad((@foo.bar is a valid address as well as a@b
>
>I've tried coming up with a line to check for sane email addresses but it
>doesn't appear to do anything different than the above. Have any input on
>what might be wrong with the one below, or how to fix the one above?  Trying
>to limit to alphanumeric (including _ ) as well as . and -
>
>
>(everything below is one line please disregard any breaks)
>
>&sorry('be') unless ($form{'EMAIL'} =~ /[\w\.-]+\@[\w\.-]+\.[\w\.-]+/);
>-
>To unsubscribe, send email to majordomo@silug.org with
>"unsubscribe silug-discuss" in the body.
>

-- 
Tighe Schlottog		Sys Admin at large	  /emry\"@"/accessus.net\
                             ook ook

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.