Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: A module to parse CSVs line by line with an ability to set delimiter

by punch_card_don (Curate)
on Mar 26, 2013 at 15:06 UTC ( #1025541=note: print w/ replies, xml ) Need Help??


in reply to A module to parse CSVs line by line with an ability to set delimiter

The DBI is your friend.

DBD::CSV

$dbh = DBI->connect (
"dbi:CSV:f_dir=$ENV{HOME}/csvdb;f_ext=.csv;f_lock=2;" .
"f_encoding=utf8;csv_eol=\n;csv_sep_char=\\;;"

"...Pay attention to the semi-colon for csv_sep_char (as seen in many CSV exports from MS Excel) is being escaped in below example, as is would otherwise be seen as attribute separator:..."




Time flies like an arrow. Fruit flies like a banana.


Comment on Re: A module to parse CSVs line by line with an ability to set delimiter

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (19)
As of 2015-07-07 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls