in reply to How can I extract the username and hostname/domain from e-mail addresses?
The Mail::Address and Mail::Header modules can do this task:
use Mail::Header; use Mail::Address; my $header = Mail::Header->new([@lines]); my($from) = Mail::Address->parse($header->get("From")); my($user,$host) = ($from->user(),$from->host());
Edit by tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: How can I extract the username/domain?
by wog (Curate) on Nov 21, 2001 at 06:44 UTC |
In Section
Seekers of Perl Wisdom