in reply to MIME Errors

Probably the missing semi-colon after the eval block...
I also suspect the last '}' to be unmatched (and useless) ?

PS : Being consistent in your code layout would help finding such 'bracket error'.
See perlstyle for good advices...
As always : just my humble opinion..

UPDATE : To find where to place the semi-colon see eval
the syntax is explained and several examples given.
And sorry but I couldn't resist : RTFM !! ;-)

"Only Bad Coders Code Badly In Perl" (OBC2BIP)