New snapshot just uploaded, in which eol => $/ is permitted for "\r". That extends successful parsing to line endings in the set undef, "\n", "\r\n", and "\r".
Enjoy, Have FUN! H.Merijn
| [reply] [Watch: Dir/Any] [d/l] [select] |
Thanks, that's a huge improvement. I'm afraid I've discovered another slight wrinkle, though:
use strict;
use Text::CSV_XS;
use IO::File;
$/ = "\r";
my $f = IO::File->new_tmpfile;
print $f ('a,b,c', $/, '"d","e","f"', $/);
seek($f,0,0);
my $c = Text::CSV_XS->new({ eol => $/ });
for(0..1){
print join("|",@{ $c->getline($f) })."\n"
}
The first getline works, but the second fails. It looks as though the quote characters are blocking recognition of \r as eol (again, the code here works if $/="\n").
Cheers,
Tim | [reply] [Watch: Dir/Any] [d/l] |
| [reply] [Watch: Dir/Any] |