#!perl -w use DBI; use strict; my $dbh = DBI->connect("DBI:CSV:csv_sep_char=|:f_dir=Hard Disk:development") or die "Cannot connect: " . $DBI::errstr; $dbh->{'RaiseError'} = 1; $dbh->{'csv_tables'}->{'productDB'} = { 'file' => 'productDB', 'col_names'=>["product_id","product","price","name","image_url","description","options"], }; my $sth = $dbh->prepare("SELECT * FROM productDB"); $sth->execute() or die "Cannot execute: " . $sth->errstr(); my @row; while (@row = $sth->fetchrow_array) { print ("Row: @row\n");} $sth->finish(); $dbh->disconnect;