perl how to write to xml file