my ($grp_name, $grp_description) = @_; my %form_values=""; my $sqlcount = "SELECT COUNT(*) FROM grp_def WHERE grp_name='$grp_name' "; my $sth = $dbh->prepare($sqlcount) || die "Cannot prepare: " . $dbh->errstr(); $sth->execute($form_values{'grp_name'}) or die "Cannot execute: " . $sth->errstr(); my $occurences = $sth->fetchrow_arrayref->[0]; print "result: $occurences\n"; #### DBD::DB2::st execute failed: execute called with 1 bind variables when 0 are needed at miller.pl line 71. Cannot execute: execute called with 1 bind variables when 0 are needed at miller.pl line 71.