Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Email Header

by mischief (Hermit)
on Nov 13, 2001 at 19:44 UTC ( #125064=note: print w/ replies, xml ) Need Help??

in reply to Email Header

Try this to grab the email addresss from $from as $email:

my ($email) = $from =~ /<([^>]+)>/ if $1;

Might be an idea to have a look at the Mail::Header module.

By the way, and this isn't relevant to your question, but you don't need to quote $1 (eg, $from = "$1"... in your example above.)

Comment on Re: Email Header
Select or Download Code
Replies are listed 'Best First'.
Re: Re: Email Header
by Anonymous Monk on Nov 13, 2001 at 21:09 UTC
    Thanks for your suggestions, for some reason that last one only returns a blank field
      What's the value of $from?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2016-02-13 06:56 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (419 votes), past polls