If you want to execute the code that exists on the other machine, consider SOAP. Briefly, SOAP is a remote procedure call (RPC) mechanism that serializes your function call and sends it over the net. It is language independent. It uses XML to specify the data (args and return) and usually HTTP to make the data transfer. You don't need to know XML to use it. There is a perl module
SOAP::Lite to make it easy along with lots of other
SOAP modules.
HTH, --traveler