in reply to getting headers from essage
NEVER MIND
Didn't see ikegami's explanation before, but it makes sense!
Tho I wouldn't be surprised if multiple "To:" headers were indeed allowed.
> So iam trying to get to this array of arrays element I solved it with splitting the string and removing leading and trailing spaces, but it's not fantastic
What you are describing is not in line with the documentation of parse_header()
It returns a hash reference in which the keys are the header field names (without the colon) and the values are references to arrays of values.
So please show us a dumps of
$$hashref{To}
and
@{$$hashref{To}}
in order to tell what's going on here.
Maybe this module's documentation is faulty or the mail is malformed or ...
Anyway using hashslices inside a deref is begging for trouble. Please change your style.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: getting headers from essage
by ikegami (Patriarch) on Dec 16, 2025 at 21:31 UTC | |
by LanX (Saint) on Dec 16, 2025 at 22:01 UTC |