Here is code but I'm getting an error.
#!/usr/bin/perl -w
use DBI;
$dbh = DBI->connect("DBI:CSV:f_dir=/home/turn2sp/tmp")
or die "Cannot connect: " . $DBI::errstr;
$dbh->{'csv_tables'}->{'Matrix'} = { 'file' => 'Matrix.csv'};
$dbh->{'csv_tables'}->{'Inventory'} = { 'file' => 'Inventory.csv'};
$sth = $dbh->prepare("SELECT * from Matrix NATURAL JOIN Inventory");
#$sth = $dbh->prepare("SELECT * FROM Inventory");
$sth->execute();
while ( @row = $sth->fetchrow_array ) {
print "@row\n";
}
DBD::CSV::db prepare failed: Parse error near NATURAL JOIN Inventory at /usr/lib/perl5/site_perl/5.8.4/i686-linux/DBD/File.pm line 195.
for Statement "SELECT * from Matrix NATURAL JOIN Inventory" at ./j line 7.
Can't call method "execute" on an undefined value at ./j line 10.