Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 exploiting the Monastery: (12)
As of 2014-07-23 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (142 votes), past polls