my @arr = qw(one two three); my $qry = $dbh->prepare('select foo from bar where baz=?'); foreach my $baz (@arr) { $qry->execute($baz); ... }