Also, it will be of great help if you give me some threads for dealing with comma delimited files. I can go through them to get a better understanding about comma delimited files. I have been searching over here and in google but couldn't find something solid, it looks like am missing something.
---------- Post updated at 09:34 PM ---------- Previous update was at 09:30 PM ----------
bhargav, your code will append , to the last field even if it is already there.
scrutinizer's code works fine. It appends "," only if it is not there.