This doesn't seem all that complicated, but it has me stuck. Well, not stuck, I could write something complicated and accomplish the same task, but I was hoping to be more elegant... and I digress.
I have a CSV file that I need to read and parse fields from. All values are quoted and the quoted string can contain commas. Sometimes, there are missing values in the record (line, row, whatever), these have no quotes at all (so you can have sequential commas for missing fields). Obviously, I need to split these records into fields. Here's an example of what a line might look like:
So trying to use split(',' $_); isn't going to give me what I want. Is there something fancy I can do with a split() regex? Any help is appreciated!