Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: Re: Extracting a list of email addresses from a mail header

by ZZamboni (Curate)
on May 15, 2000 at 22:09 UTC ( [id://11707]=note: print w/replies, xml ) Need Help??


in reply to Re: Extracting a list of email addresses from a mail header
in thread Extracting a list of email addresses from a mail header

I think you are bypassing the documented interface of Mail::Header by accessing its internal data like that (mail_hdr_hash). The following gives you the headers with the keyword removed:
push @hlines, $header->get('To'); push @hlines, $header->get('Cc'); push @hlines, $header->get('Bcc');
According to the Mail::Header documentation, get() in array context returns "a list of all the text from all the instances of TAG". Which should be what you are looking for.

--ZZamboni

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-06-18 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.