use Text::CSV_XS; use IO::Wrap; my $csv = Text::CSV_XS->new(); my $fh = wraphandle(STDOUT); $csv->print($fh, ['','test']);