in reply to A better way to split CSV files with quoted strings that may contain commas?

Just for enjoy, the better way is to use previously adviced modules.

When you split the row by comma, you must check the count of quotes in every array item, from 0th to Nth. When this count is odd, you must join that item with the next item and test the count again. If the item with odd count of quote is the last, you must add split items from the next row (it occurs when \n in strings).

  • Comment on Re: A better way to split CSV files with quoted strings that may contain commas?