http://www.perlmonks.org?node_id=1031647

perlvroom has asked for the wisdom of the Perl Monks concerning the following question:

Can someone tell me the best way to go about this? I've seen a few examples but i want to set it up with as little editing as possible so that if i need to add a new value, i just have to add the new value to the array.
my @id=(1,2,3,4); my $sth = $dbh1->prepare("SELECT name FROM table where id in ?") or d +ie "Couldn't prepare statement: " . $dbh1->errstr; $sth->execute(@id)