$sth = $dbh->prepare('SELECT * FROM foo WHERE foo = $1 AND bar = ANY ($2)'); $sth->execute(1, [1,2,3]);