$Type contains the splitted result of field->mime_type. You are however splitting at the character '/' therefore it is impossible that $Type contains the pattern 'multipart/mixed'. If $field->mimetype returns 'multipart/mixed' then $Type will contain 'multipart' and $subtype will contain 'mixed'.
Update:
looking at the code i was also confused by the way you created your fields 'object'. You just assign the string 'Content-Type' to a variable called $field and rely on perl symbol table voodoo to dereference it to MIME::Field::ContType. I recommend that you have a look at the syntax used in the example of MIME::Field::ContType. It might help you getting closer to a solution.
Another problem is: assuming the desired information is contained in the $header - you aren't accessing it anywhere.
If you want to have a look at some working examples you might try searching google for o'reillys perl cookbook. It contains complete example scripts which might help you solve common problems.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.