in reply to Re^4: Joining multiple lines together while parsing
in thread Joining multiple lines together while parsing

so I can use it for csv?

Use Text::CSV:

use Text::CSV; my $csv = Text::CSV->new({binary=>1, always_quote=>1, blank_is_undef=>1, eol=>$/, auto_diag=>2}); $csv->print(select, ['foo', 'bar']); __END__ "foo","bar"

Replace the call to select with a $filehandle (open) if you're writing to a file.