12345
my @names = qw(name1 name2 ...);my $select = 'SELECT fields from tble where name IN('.join(',',('?') x scalar(@names)).')';my $sth = $dbh->prepare or die $dbh->errstr();$sth->execute(@names);