?I have fixed the unmatched '}' but the two errors remain :( How do you mean semi-colon after eval block? There is on at the end of that line, is there supposed to another ?
use MIME::Parser;
use Mail::Address;
$parser = new MIME::Parser;
eval {
$MIME_entity = $parser->parse(\*STDIN);
}
if ($@){
print 'Trouble parsing mail:';
print $parser->results->msgs();
}
else {
$header = $MIME_entity->head();
$subject = $header->get('Subject');
my $from = $header->get('From');
my @from_addresses = Mail::Address->parse($from);
my $address;
if (@from_addresses) {
$address = $from_addresses[0]->address();
} else {
print "No address found in from line!\n";
}
$bodyh = $ent->bodyhandle;
}
$parser->filer->purge();