Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Validate newline delimited email list

by japhy (Canon)
on Jan 12, 2007 at 21:08 UTC ( [id://594454]=note: print w/replies, xml ) Need Help??


in reply to Validate newline delimited email list

First of all, use split /\n/. Don't put a literal newline in your code -- that's ugly. Second, the chomping is entirely unnecessary if you're splitting the string on newlines. Third, are you entirely sure the email addresses contain validly formatted addresses and nothing else? I'd suggest doing:
foreach (@other_addresses) { my $ok = Email::Valid->address($_); print "address($_) = $ok\n"; }

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://594454]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-18 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found