How can I select multiple rows using parameters from an array in Perl's DBI module?
问题 I am required to pull out rows corresponding to column name . The rows being pulled out correspond to address in array @values . Following is my code: use strict; use DBI; open (FH, "/user/address") or die $!; my@values=<FH>; close(FH); my @names; my $query = "Select name from table where address = ?"; my $sth = $dbh->prepare( $query ) or die "could not prepare statement\n", $dbh->errstr; foreach my $value(@values){ #@values contain list of address $sth->execute($value) or die "could not