my $dbh = ....; my $sth = $dbh->prepare( "SELECT fld from tab where fld = ?" ); $sth->bind_param(1, "val"); $sth->execute;