A way you might want to do this is setup a "small server" on the remote host to run your app and return the results. Look at IO::Socket.
Create a server that accepts the connection then runs the application capturing all of the output. The when the application is done send the results back through the socket. If you are worried about security or encryption look at the Net::SSL package (I Believe) for doing encrypted socket communication.
This is one way to approach the problem.
in reply to Running Applications on a Remote Host