in reply to Re: Regex with malformed CSV files
in thread Regex with malformed CSV files

Thanks for the info! Here's what i ended up doing using Text::CSV_XS

while(!($csv->parse($line)) || $csv->fields < $COLUMNS) { $line =~ s/\r//g; $line =~ s/\n$/=0D=0A/; $line .= <IN>; }


So while it's an invalid line (csv->parse) or the number of fields (csv->fields) isn't equal to the number of colums... it just keeps grabbing lines.

Thanks again!