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

Which CSV - Module is my favourite?

by Ben Win Lue (Friar)
on Jan 18, 2006 at 08:43 UTC ( #523934=perlquestion: print w/replies, xml ) Need Help??
Ben Win Lue has asked for the wisdom of the Perl Monks concerning the following question:

Hi everbody out there!

I have to parse some simple CSV-Files. Text::CSV seems to be my friend, except that here in Germany most CSV-Files are separated by semicolons, since a comma is the standard decimal point here. ( I don't know if this was a microsoft idea, but it became more and more normal in the past 10 years).

Is there a way to set the separator character in Text::CSV?

If not, what else would be worth a look?

The files are quite simple, may be should just use  split and get rid of the leading and trailing quotes?

Thanks a lot!

Replies are listed 'Best First'.
Re: Which CSV - Module is my favourite?
by blazar (Canon) on Jan 18, 2006 at 08:51 UTC
    I used Text::CSV_XS and it definitely supports alternative filed separators. I recommend it over Text::CSV in any case because it is a fast C reimplementation of the latter.
Re: Which CSV - Module is my favourite?
by dragonchild (Archbishop) on Jan 18, 2006 at 14:51 UTC
    Text::xSV is your friend. It is a superset of the features in Text::CSV_XS, yet is pureperl and almost as fast. And, it is a lot more robust (in my opinion) with a much clearer API.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://523934]
Approved by jbrugger
[usemodperl]: greetings
[usemodperl]: question
[usemodperl]: perldoc -v 'ARGV' works but perldoc -v "STDIN' does not, but they are both filehandles. is there a perldoc for STDIN?

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2018-06-19 19:11 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.