in reply to Parsing text file to CSV

It would be easier for all of the Monks here if you would show us:
  1. A short but significant part of your input file
  2. A (hand made) example how the result should look like.
Please note, the specs on "CSV"-files are utterly unclear. Everyone and some have their own ideas how they should look, so some info or examples will be helpful.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James