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

I have an existing program which takes a directory path and processes recursively tis directory and its files. I need to change this code to use a directory on a remote system, so for example:
#### What do I do here to get that path via rsh process_directory ##### sub process_directory #takes a path to directory

Replies are listed 'Best First'.
Re: Process of files via rsh
by onelesd (Pilgrim) on Jun 10, 2011 at 20:46 UTC

    If you have a linux shell:

    scp yourscript.pl user@server.domain.com:/tmp && \ ssh -t user@server.domain.com 'perl /tmp/yourscript.pl'

    If you set up ssh keys you can do this without a password and run it from cron or other automated process if you like.