good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Shuckin' the Email Addyby chromatic (Archbishop) |
on Sep 07, 2000 at 06:17 UTC ( [id://31354]=note: print w/replies, xml ) | Need Help?? |
Note that the perlfaq correctly notes that there is no simple regex to match an RFC-822 compliant e-mail address. Please note this!
With that in mind, if your data file is as simple as what you say, I would do something like this: (undef, $address, undef) = split '', $line; I wouldn't bother with trying to match anything else, I'd just split. Again, this depends on your text file being *very* simple, as simple as you've described it above. For anything else, the modules Email::Find and Email::Valid might come in handy.
In Section
Seekers of Perl Wisdom
|
|