my $query = q{select distinct account, account_id, company, the_date from account_information where account_id = ?}; my $sth = $dbh->prepare($query); $sth->execute($_); #### my $query = "select distinct account, account_id, company, the_date from account_information where account_id = ?"; my $sth = $dbh->prepare($query); $sth->execute($dbh->quote($_));