I am trying to parse a file in a csv format where the fields are separated by commas and the field contents are quoted, ala:
"f1","f2","f3","f4"
Works most of the time with this:
@line=split(/,/,$_);
Now, I find a file that has an embedded comma in one of the fields, ala:
"f1","f2","f3,a","f4"
^^^
which throws this routine into a snit. While I look elsewhere, I am asking here if anyone can post a routine to handle this.
Thanks,
miker
"f1","f2","f3","f4"
Works most of the time with this:
@line=split(/,/,$_);
Now, I find a file that has an embedded comma in one of the fields, ala:
"f1","f2","f3,a","f4"
^^^
which throws this routine into a snit. While I look elsewhere, I am asking here if anyone can post a routine to handle this.
Thanks,
miker