I'm reading a .csv file that was created in Excel with the first line being column headings. One column heading contains an embedded newline. I want to ignore that newline but reading it line-by-line like:
while ( <IN> ) {
...
}
will treat it as a new line which will break my code (which I haven't written yet). My approach was to read the first line into an array of column headings and process the rest of the lines differently.
Is there maybe a regex I can use somewhere in the while
that ignores the newline unless it's the last new line?
Or should I be approaching this differently?