perl -MText::CSV -lpe 'BEGIN{$c=Text::CSV->new({always_quote=>1})} $c->parse($_); $c->combine($c->fields); $_=$c->string' textfile.csv