$sql = qq~UPDATE ${table_prefix}config SET config_value = ? WHERE config_name = ?~; $sth = $dbh->prepare( $sql ) or die DBI::errstr; foreach $conf(@config) { ($name,$value)=@$conf; $sth->execute($value, $name);