use Text::CSV; my $csv = Text::CSV->new({binary=>1, auto_diag=>2, eol=>$/}); $csv->print($fh, ['1234565', "Prototype", "Number in address is $number. Please, Please check your records."]);