use Text::CSV; my $csv = Text::CSV->new(); while (<>) { $csv->parse($_); print join("\t", $csv->fields()); }