I know this isn't hard, and I'm sure I'll figure it soon... but hoping maybe someone else just has it worked out or knows of a tool for me.
I'm writing a simple script which processes a CSV file... and I'm having a hard time getting all the cells out, specifically in my files some cells are quoted and some aren't.
i.e. I need to handle a line like
0005,12,,BAR,"FOO,BOO"
as
0=> 0005
1=> 12
2=>
3=> BAR
4=> FOO,BOO
And for some reason this is giving me a headache, any suggestions?
I'm writing a simple script which processes a CSV file... and I'm having a hard time getting all the cells out, specifically in my files some cells are quoted and some aren't.
i.e. I need to handle a line like
0005,12,,BAR,"FOO,BOO"
as
0=> 0005
1=> 12
2=>
3=> BAR
4=> FOO,BOO
And for some reason this is giving me a headache, any suggestions?