I’m new to Perl. This is a sample csv entry similar to mine.
I would like to parse this, tried briefly Text::CSV, but no luck. The issue here is newline and
commas inside fields. How could I parse this file in Perl? Thanks for the help.
1,A,"Length of x, where x is y"
2,B,"Set A to “10”, an invalid state"
3,C,"Solve
A+B and
B+A
"
4,D, Set C to B
This code (taken directly from Text::CSV documentation):
Produces the following output:
Which (I’m guessing) is what you want to achieve.