in reply to passing a hash to Mime::Lite and thence to SendMail

First: get some sleep! Second: learn how to reference Perl data structures. Maybe that sounds harsh, but you've got some very basic syntax problems which you need to resolve before you can write a script that does anything useful. For example:

   sendmail ( ${ %params } );

That simply makes no sense at all. It's trying to treat a hash as a scalar-ref! There's just no way that can work - until that's obvious to you there's really not a lot we can do for you aside from rewriting your entire program.

If your books aren't making sense, perhaps take a read through perldata, perlref and perldsc.

-sam