# connect to mesh db my $dbh = DBI->connect( "dbi:Pg:dbname=foobar", "foo") || die "couldn't open db \n"; # prepare statement, $dtable is the table name I am passing in as a parameter my $rm = $dbh->prepare("DELETE FROM $dtable (pubmed_ui) VALUES (?)"); # when I parse from xml file my $pmid = ($root->descendants('PMID'))[0]->text; print "PMID: $pmid\n"; $rm->execute($pmid); #### DBD::Pg::st execute failed: ERROR: parser: parse error at or near "(" at character 20 at ../../bin/remove_disease.pl line 55. # line 55 is my execute statement but I think my syntax is wrong in my prepare statement