Have you considered making this a CGI or mod_perl handler? That's the easiest. Otherwise, you could use a perl RPC thing (PlRPC) if both clients are in perl, or a SOAP or RPC-XML thing if not.
Comment on Re: Help with passing of ports and xml files...