my $csv = Text::CSV->new ({ binary => 1, auto_diag => 1 }); $csv->eol ("\r\n");