Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: run a perl script on a unix machine from a win machine

by sumeetgrover (Monk)
on Dec 01, 2011 at 15:34 UTC ( [id://941095]=note: print w/replies, xml ) Need Help??


in reply to run a perl script on a unix machine from a win machine

Why don't you simply upload the script from Windows to Unix server via scp etc. and run it directly on UNIX?
  • Comment on Re: run a perl script on a unix machine from a win machine

Replies are listed 'Best First'.
Re^2: run a perl script on a unix machine from a win machine
by akrrs7 (Acolyte) on Dec 01, 2011 at 15:47 UTC
    Because it needs to be run on n number of servers and I need the results on my win desktop. It would be a pain to upload the script on each server and get the results file back to my machine each time I want to run the script.

      Write a deploy script that copies the work script to all servers. Something like this:

      #!/usr/bin/perl use strict; use warnings; foreach my $server qw( oldserver newserver strangeserver ) { system "pscp workscript.pl user\@$server:/tmp/workscript.pl"; }

      For instant results, add this to the foreach loop:

      system "plink user\@$server perl /tmp/workscript.pl -foo -bar -kab +oom";

      Or use one of the SSH modules available at CPAN.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Well, that's how the world works. You got to have the program on the machine where you want to run it. There's absolutely no way to run a program that's one one machine on another without first transferring the program. Regardless of what OS the machines runs, or in which language the program is written in.

      It's like wanting to read a book that's in the library. You first get to check out the book...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found