$cureq .= ''."\n"; open (XML, '>:encoding(UTF-8)', $xmlfile) or return("Could not open $xmlfile");