use warnings; use strict; use Text::CSV; use Data::Dump; my $csv = Text::CSV->new ({ binary=>1, auto_diag=>2, quote_char=>"'", allow_whitespace=>1 }); while ( my $row = $csv->getline( \*DATA ) ) { dd $row; } $csv->eof; __DATA__ (101, '1997-02-25', 'S1', 31.00, NULL, 0.00, 'this becomes two fields, so no go', 5.11), (102, '1998-03-26', 'S1', 31.00, NULL, 0.00, 'this will remain one field', 6.11), #### [ "(101", "1997-02-25", "S1", "31.00", "NULL", "0.00", "this becomes two fields,\nso no go", "5.11)", "", ] [ "(102", "1998-03-26", "S1", "31.00", "NULL", "0.00", "this\nwill remain one field", "6.11)", "", ]