in reply to Sending & Executing a perl script on remote machine.

When you start going down this road, be sure you know where it really ends, and observe if it is “choked with weeds and abandoned,” or “well-paved and obviously recently-trod.”   If what you really need is a lightweight batch-process monitor, then there are plenty to choose from in CPAN.   There needs to be a little alarm that goes off that says, “aren’t I doing something that has been done, hundreds if not thousands of times before?”   The answer in this case is undoubtedly, “yes.”   Therefore, troll CPAN first.   You will find something that is a more thorough and well thought out solution than you could ever cobble together by hand, and it is just about true to say that you can “just drop it in.”