It sounds like you're just asking about invoking
a remote script as you might through a web
browser (as opposed to a particular procedure).
But just in case you were asking about RPC:
How can I do RPC in Perl?.
Comment on Re: How do I invoke a procedure on a server remotely?