47 my $mp = new MIME::Parser; 48 $mp->ignore_errors(1); 49 $mp->extract_uuencode(1); 50 51 eval { $e = $mp->parse($fh); }; 52 my $error = ($@ || $mp->last_error); 53 54 if ($error) 55 { 56 $mp->filer->purge; # Get rid of the temp files 57 die "Error parsing the message: $error\n"; 58 }
Example 2: Parsing the MIME structure.