Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Which CSV - Module is my favourite?

by Ben Win Lue (Friar)
on Jan 18, 2006 at 08:43 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://523934]
Approved by jbrugger
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-29 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found