in reply to Re^2: Joining two files on common field
in thread Joining two files on common field

To get a better error message, change
$sth = $dbh->prepare("SELECT * from Matrix NATURAL JOIN Inventory");
to
$sth = $dbh->prepare("SELECT * from Matrix NATURAL JOIN Inventory") or die "Cannot prepare: " . $DBI::errstr;