in reply to Re^2: trouble with MIME::Tools
in thread trouble with MIME::Tools
The following works for me. What's your beef? Give a similar example that doesn't work for you.
use warnings; use strict; use MIME::Parser; my $email = 'Subject: none'; my $parser = new MIME::Parser; my $entity = $parser->parse_data ($email) or die "Bad Parse. "; my $subject = $entity->head->get ('subject', 0); my $crap = defined $subject?$ entity->head->get ('Subject', 0) : 'unde +f'; print $crap;
|
|---|