in reply to Re^3: The future of Text::CSV_XS - TODO
in thread The future of Text::CSV_XS - TODO
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").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" }
Cheers,
Tim
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: The future of Text::CSV_XS - TODO
by Tux (Canon) on May 31, 2007 at 10:39 UTC | |
by tfrayner (Curate) on May 31, 2007 at 14:49 UTC |