Did you have a look at or try something like MIME::Parser? It seems to be able to do what you need without you having to code the parsing yourself.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Splitting folded MIME headers into indivual headers?
by jeffa
in thread Splitting folded MIME headers into indivual headers?
by sebastiannielsen2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |