Again, I can't overemphasize the advantage of using a well-known-protocol for the communication. In this case, my favorite round-trip of choice is HTTP. Look
into creating a server with
HTTP::Daemon, and then your client can
perform transactactions with easily-generated
LWP::UserAgent objects.
-- Randal L. Schwartz, Perl hacker