in reply to Output to a >CSV file
It looks like you're already outputting TSV format, aren't you? Anyway, for CSV (and TSV), I'd strongly recommend Text::CSV (also install Text::CSV_XS for speed). You can see one example of how to read and write CSV with it here (and here are a few more examples via Super Search).
|
|---|