Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: The future of Text::CSV_XS - TODO

by Tux (Monsignor)
on Mar 31, 2014 at 12:47 UTC ( #1080392=note: print w/ replies, xml ) Need Help??


in reply to Re: The future of Text::CSV_XS - TODO
in thread The future of Text::CSV_XS - TODO

As of Text::CSV_XS-1.05, you can catch/ignore any error at your own risk:

my ($c, $s); sub ignore3006 { my ($err, $msg, $pos, $recno) = @_; if ($err == 3006) { # ignore this error ($c, $s) = (undef, undef); SetDiag (0); } # Any other error return; } # ignore3006 $csv->callbacks (error => \&ignore3006); $csv->bind_columns (\$c, \$s); while ($csv->getline ($fh)) { # Error 3006 will not stop the loop }

Note that this API is young and new. New insights might enhance or change later on.


Enjoy, Have FUN! H.Merijn


Comment on Re^2: The future of Text::CSV_XS - TODO
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1080392]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-12-23 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (135 votes), past polls