Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Execute remote Perl scripts

by patnil (Initiate)
on Oct 09, 2002 at 14:39 UTC ( [id://203933]=perlquestion: print w/replies, xml ) Need Help??

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

How do I, from a Perl script, execute another Perl script on another machine?

Thanks in advance.

Replies are listed 'Best First'.
Re: Execute remote Perl scripts
by Abigail-II (Bishop) on Oct 09, 2002 at 15:07 UTC
    The same way as you would execute any other program on said machine. It isn't Perl specific, but it's specific on the remote (and local) machine configuration - and any routers/firewalls in between.

    Typical ways include using rsh (called remsh on some OSses), or UUCP (who remembers working with UUCP?). Unsafe methods, both of them. A someone safer method is the use of ssh - but that's harder to script if you want to make it secure.

    But there are other ways. HTTP for instance, in combination with CGI. Or the use of inetd. You could even share a disk with a remote machine and trigger execution that way.

    Note that none of the method is Perl specific, and none of the methods is a "will work anywhere" solution.

    Abigail

Re: Execute remote Perl scripts
by jj808 (Hermit) on Oct 09, 2002 at 15:08 UTC
    Depends what OS you're using :-)

    For UNIX, try using the system's rsh command (remote shell), or ssh (secure shell). Or you could use Net::Telnet to login to a remote machine and execute the script that way. If that's too insecure, look at the SSH modules.

    PVM and Parallel::Pvm might be worth a try as well if you want to get into distributed processing.

    JJ

    Update:
    Or XML-RPC. Or SOAP. There are quite a few ways to run remote programs...

Re: Execute remote Perl scripts
by shushu (Scribe) on Oct 09, 2002 at 15:13 UTC
    I use PlRPC module to do it. It gives you the ability to control objects and so on another machine, and it is proved as very useful. shushu
Re: Execute remote Perl scripts
by JaWi (Hermit) on Oct 09, 2002 at 15:54 UTC
    Just the other day I was coming across Penguin; which aims to provide a "secure" way to execute remote processes. I didn't really checked it out any further, but it could be of interrest!

    Good Luck!

    -- JaWi

    "A chicken is an egg's way of producing more eggs."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://203933]
Approved by diotalevi
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found