$update=<prepare($update); foreach $recid (keys %records) { $dbstmt->execute($newvalues{$recid}, $recid); }