in reply to Re^3: csv to xml
in thread csv to xml

Yes.

If the CSV is well-formed, internal commas will be escaped in some way, eg:

Ed Smith, "Smith, Brown & Jones", sbj@example.com, "999,999,999"

Of course, if it isn't well-formed, I agree that Text::CSV will not help any more than a hand-rolled CSV parsing kludge...

Replies are listed 'Best First'.
Re^5: csv to xml
by Marshall (Canon) on Aug 06, 2016 at 17:06 UTC
    I'd say at this point, we just don't have enough info about the actual data and where it comes from. I am working with one CSV file now and I had a choice of the separator character and chose the pipe, "|", instead of comma ",". We've got a case here where the example data probably doesn't come close enough to the "real thing". The original code didn't come close to working either. If this is a "real" CSV, then Text_CSV will help.