pcouderc has asked for the wisdom of the Perl Monks concerning the following question:
What do I do wrong ?
... open my $fh, "<:encoding(utf8)", "ddd.CSV" ; my $csvfile=Text::CSV_XS->new (); until (eof $fh) { if($csvfile->parse(<$fh>)) { my @resu=$csvfile->fields(); print STDERR $resu[0],$resu[1]; } else { my $err = $csvfile->error_diag(); print STDERR "Erreur : $err\n"; } }
ddd.CSV :
"01012019","1816"
my unexpected resulted (unexpected from me...) :
Erreur : EIF - Loose unescaped quote
Thank you, o confinated monks !
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bad Text::CSV_XS parameter
by haukex (Archbishop) on Apr 24, 2020 at 13:15 UTC | |
by pcouderc (Monk) on Apr 24, 2020 at 13:27 UTC | |
by hippo (Archbishop) on Apr 24, 2020 at 13:56 UTC | |
by pcouderc (Monk) on Apr 24, 2020 at 15:09 UTC | |
by Tux (Canon) on Apr 24, 2020 at 20:52 UTC | |
| |
|
Re: Bad Text::CSV_XS parameter
by afoken (Chancellor) on Apr 24, 2020 at 18:28 UTC | |
|
Re: Bad Text::CSV_XS parameter
by hippo (Archbishop) on Apr 24, 2020 at 12:49 UTC | |
by pcouderc (Monk) on Apr 24, 2020 at 13:04 UTC | |
|
Re: Bad Text::CSV_XS parameter
by marto (Cardinal) on Apr 24, 2020 at 12:59 UTC | |
by pcouderc (Monk) on Apr 24, 2020 at 13:07 UTC |