protoss has asked for the wisdom of the Perl Monks concerning the following question:

Scenario:

I have created a Perl script on a remote windows server (installed Active Perl on the remote server) that strips unwanted content from several text files and concantenates them into one file for further database processing.

Problems:

The user mapped the file directory of the remote machine and tried to run the script. It would not run. So I VNC to the server and run it from the host console for her (not the ideal situation). Of course, we both conclude that we must have Perl installed on the local desktop in order to run Perl on the remote server. So I go back to my local desktop (Active Perl is installed) and run the script remotely. It runs, but it may be running at least 10 times slower. I'm assuming that it is doing the processing on my local desktop PC processor and running data over the network. (not the ideal situation, either)

How can I run Perl scripts remotely and avoid the above 2 undesirable effects?

Does the solution have anything to do with RPC?

Replies are listed 'Best First'.
Re: Remote Execution of Perl Scripts
by data64 (Chaplain) on Dec 31, 2002 at 17:34 UTC
Re: Remote Execution of Perl Scripts
by traveler (Parson) on Dec 31, 2002 at 18:46 UTC
    Since your question is Windows-specific, there are some Windows tools to do what you want. These can be used to execute arbitrary EXEs. (Most of us would agree that perl is not arbitrary, though :-) Anyway, here are some examples of tools you can use. The links are by no means the only implementations of some of the tools: There are other ways, but that should get you started.

    HTH, --traveler

Re: Remote Execution of Perl Scripts
by slugmax (Hermit) on Dec 31, 2002 at 19:02 UTC
    Is it necessary to remotely execute the perl script at all? Perhaps a better solution would be to set up an automated task on the remote server that periodically runs the perl script in question. This would work nicely if you knew the names/locations of the text files you are trying to edit, and they stayed in the same place.

    If it is truly necessary, consider installing Cygwin and configuring an SSH server, then using SSH to remotely execute commands.

    Almost any SSH client would do the trick in that case, as Cygwin is using recent versions of OpenSSH, providing SSH version 1 and 2 support.

    Interestingly, Cygwin also includes a port of Perl (Currently 5.6.1, with 5.8 in testing).

    Doug