for my $val(@values) { my $sth = $dbh->prepare_cached( "UPDATE foo SET bar=7 WHERE baz=?" ); $sth->execute($val); }