Perl - MIME::Parser


my $parser = new MIME::Parser;
$parser->decode_headers(1);     // default is false.  Automatically attempt RFC-1552
                        // to decode the MIME headers

$parser->extract_nested_message(0);        // default is true
$parser->extract_uuencode(1);            // default is false.  Look for uuencode in "text" messages and extract it.

eval {
    $entity = $parser->parse(\*STDIN);
if ($@) {
    $result = $parser->results;
    $decapitated = $parser->last_head; // get the last top-level head

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License