http://qs321.pair.com?node_id=1025541


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