use Text::CSV; my $csv = Text::CSV->new({binary=>1,eol=>$/, quote_char=>undef,escape_char=>undef}); $csv->print(\*STDOUT, ["1","2",'""']); __END__ 1,2,""