#prepare my $sth = $dbh->prepare('SELECT * FROM people WHERE lastname = ? AND firstname = ?'); #execute with list of bindvars $sth->execute( $lastname, $firstname ); [download] But it's a bit cumbersome to adjust the bind values if the order changes.