in reply to perl & Asynchronous Javascript

All you need to do is return an valid XML document. You can also set content-type to text/xml which will automatically force it into an XML object when received by your Javascript.