in reply to Re: MIME::Lite truncating attachment
in thread MIME::Lite truncating attachment

I first thought $body would be initialized to '0' as the size of the list similar to @b=(); $body=@b

But $body gets initialized to the empty string. Seems (by running perl -D1 -e '$b=();') that () is interpreted as an empty term folding to a (wrong!?) boolean expression like $body=(1==0)

my ( $body,$csv)=('','"'); would suffice, your code misses the initialization. If you run that without 'use strict' you won't get errors, but $csv is still missing the init to '"', so the first value in the $csv string would have no opening quotation mark