in reply to Compare CSVs FILES using REGEX or pattern matching
As the others already stated, do not parse CSV with regexes. Ever. If your data is extremely simple (and guaranteed to stay simple), a split might be the way to go, but usually simple CSV doesn't stay simple and embedded newlines, separation characters or quotation will lead into unmaintainable code. Stick with Text::CSV_XS (or Text::CSV if you don't care about the speed) for parsing CSV.
The Text::CSV_XS distribution has an examples section that hosts the csvdiff script, which might be exactly what you are looking for. Feel free to get that and amend it to your needs.
|
|---|