Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Validate newline delimited email list

by phaylon (Curate)
on Jan 16, 2007 at 12:54 UTC ( [id://594900]=note: print w/replies, xml ) Need Help??


in reply to Validate newline delimited email list

Just as a quick note, I would do:
my @addrs = split /\n/, $email_list; my @addrs_invalid = grep { not Email::Valid->address($_) } @addrs; print 'The following Email addresses are invalid:<ul>' . (map { '<li>' . $_ . '</li>' } @addrs_invalid) . '</ul>';
Untested and only proof of concept (no encoding and stuff), of course ;)

Ordinary morality is for ordinary people. -- Aleister Crowley

Log In?
Username:
Password:

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

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

    No recent polls found