in reply to Parse attachment file names from e-mail

Everything after the blank line (not shown, but probably before "Some junk text here.") is the body of the message, not the headers. The body may contain further MIME parts, each of which has its own headers, but you'll have to look at each one seperately.

I believe you'll want to use MIME::Parser to parse the message. It will give you a MIME::Entity which will have a parts() method that should give you all of the MIME parts. Each of these parts will have a MIME::Head object (accessible through the head() method) with the headers for that part.

Be aware that each MIME part can itself contain nested parts.