in reply to How might one determine empty XML payload?

print $client->responseHeader("Content-Length") < 56 ? "Empty\n" : "Something...\n";

56 is a guess, the XML string you said is an empty payload is 55 but it might have a new line or something too. :P If the Content-Length header is not in the XML you can do the same length check on the body. This would be faster but likely not as robust as checking the XML.