Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Validate newline delimited email list

by japhy (Canon)
on Jan 12, 2007 at 21:08 UTC ( #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

Comment on Re: Validate newline delimited email list
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2015-11-27 16:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls