Been a long time since I've been here, but I'm encountering a problem I need some assistance. Hopefully it's something easy, but I just can't see to get the code to work how I want it too.
So, I have this csv file that I want to parse. but the problem is, the person who was updating the spreadsheet put "newlines" in the cells (using alt+return I believe). So, as you can imagine, when I'm trying to parse the file, one record maybe contain several lines in the file.
What I would like to do is replace the new lines (or returns) with
so when I update to our database, and view with a browser, the format is preserves. I'm doing the replacement with $_ =~ s/(\r+|\n+)/<br>/g;. Which is working, but it's putting
in places that I don't want.
Example,
1. The first line in the csv file is each of the column names, I don't need
there.
2. The start of each new records begins with a "TC-" so I don't need a
at the very end of that record either. Again, the record may be several lines (it varies), until the next "TC-" is found.
Any thoughts ???
Thanks all !!!
In reply to Parsing a CSV file in a unique way by TASdvlper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |