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

Re: How can I extract the username/domain?

by wog (Curate)
on Nov 21, 2001 at 06:40 UTC ( #126711=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2022-12-06 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?