Subject: | eol not working for values other than "\n"? |
Am I missing something? I don't see why I'm getting an error.
Show quoted text
------ BEGIN CODE ------
use strict;
use warnings;
use Text::CSV_XS qw( );
print "$Text::CSV_XS::VERSION\n";
for my $eol ("\n", "!") {
print("--\n");
my $csv = Text::CSV_XS->new({
binary => 1,
sep_char => ":",
eol => $eol,
});
my $file = join($eol, qw( "a":"b" "c":"d" ));
open(my $fh, '<', \$file) or die;
while (my $pair = $csv->getline($fh)) {
print("@$pair\n");
}
$csv->eof()
or die("parse error: " . $csv->error_diag());
}
------ END CODE ------
------ BEGIN OUTPUT ------
0.73
--
a b
c d
--
parse error: EIQ - QUO character not allowed at b.pl line 25, <$fh> line 1.
------ END OUTPUT ------