First of all, 'use strict' does not work if you put a '#' before it
I tried your code with my values for mailserver, recipient etc., but had to change my $from="bla@xyz"; to my $from='bla@xyz'; because if you use an address with '@' in it, you better not interpolate the string.
Sent it and it worked. Attachement came in flawlessly (if I didn't use any special characters).
Could it be that in your csv file there are 8-bit characters, for example umlauts? Usually you need something like $part->attr('content-type.charset' => 'UTF-8'); to identify the right character encoding
You could look a bit closer at the garbage you are receiving (compare it to the source file) or post it here. In most cases it is not random garbage but gives broad hints about what happened to the source file. Was it base64 encoded or maybe packed?
UPDATE: added info about character encoding
In reply to Re: MIME::Lite behaving strange
by jethro
in thread MIME::Lite behaving strange
by bar10der
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |