# Do the updating... foreach (keys (%Data)) { $dbh->do(" update new_table set newData=\"$Data{$_}\" where newID=$_ "); } # end-foreach