http://qs1969.pair.com?node_id=473210


in reply to Code Misses a Replacement

This may makes things more complicated than you need, but I should point out that most CSV dumps use quotation marks to escape strings that have commas in them. This is something to watch for: some,comma-delniated,"file with a, comma",in the data

You might take a look at Text::CSV, you could do something like: (untested)

use Text::CSV; my $csv = Text::CSV->new(); while (<>) { $csv->parse($_); print join("\t", $csv->fields()); }
That's pretty simplistic, and won't handle tabs in the data, but you get the idea.


Xaositect - Whitepages.com