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.)
In reply to Re: Email Header
by mischief
in thread Email Header
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |