I would second the motion to use
Text::CSV_XS For the last four or five years I have been handling CSV files all day in a huge variety of variants. For some time I ysed a homme-grown module, but it was never quite the success that this one has been! If you want to do it yourself, have a look at the source code, I am sure you will see a few possible gotcha's you have never thought of!
jdtoronto