my $csv = Text::CSV_XS->new ({ strict_eol => 1 }); $csv->strict_eol (0); my $f = $csv->strict_eol; #### 1,A,Ape\r\n 2,B,Bear\r\n 3,C,Canary\n <-- will warn with error 2016 #### 1,A,Ape\r\n 2,B,Bear\r\n 3,C,Canary\r\r\n <-- will warn with error 2016 but also might not return an empty row