I have many csv file to orgnize. I try to use dbi:csv but not a clue.
use DBI; $dbh = DBI->connect("DBI:CSV:f_dir=/base/") or die "Cannot connect: " . $DBI::errstr; $sth = $dbh->prepare("CREATE TABLE a (id INTEGER, name CHAR(10))") or die "Cannot prepare: " . $dbh->errstr(); $sth->execute() or die "Cannot execute: " . $sth->errstr(); $sth->finish(); $dbh->disconnect();
When I use this code, where is the data base locates? Is that a file or something else? Can I use a existing csv file as a data base? I totally dont know how to ge the codes from cpan work for me.
Code tags added by GrandFather
In reply to dbi:csv how to by zli034
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |