in reply to Run Perl script on remote server

Simple: open a pipe to ssh.

Or run your Perl programs in a Web server, and write a PHP HTTP client for them (fopen, curl).

If that is not possible or sufficient, then you're looking for RMI/distributed computing (or conceptionally equivalent). If you have no idea where to start, simply run a Perl SOAP server and PHP SOAP client, SOAP sucks hairy donkey balls but at least it's painless in PHP. There are many more protocols (XML-RPC, JSON-RPC, Corba, …) and you can invent your own protocol (on top of sockets, on top of HTTP, …).

Replies are listed 'Best First'.
Re^2: Run Perl script on remote server
by tmharish (Friar) on Feb 14, 2013 at 18:03 UTC
    Or run your Perl programs in a Web server, and write a PHP HTTP client for them (fopen, curl).

    I did that once and it works very well - POST and GET values can be passed on as is and the testing can be done on the server with Perl while completely ignoring the one with PHP ( Server A ).

    The only downsides are:

    • Cross domain scripts sometimes give the user a scary error
    • The browser will render nothing until the entire HTML is thrown out which might make page loads appear slow to the user - You cant flush STDOUT halfway to get the browser to start rendering stuff.