For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > September 2004 > Remote execution & FTP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Remote execution & FTP
Arjun Mallik

2004-09-27, 3:57 pm


Hai
=0D
I need to Call a PERL script on OTHER SERVER from MY SERVER and get
the file generated there back to MY SERVER
Can you please suggest how can i do that?

Thanks in advance
Arjun




Confidentiality Notice=0D

The information contained in this electronic message and any attachments to=
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or=
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or=
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
Bob Showalter

2004-09-27, 3:57 pm

arjun.mallik@wipro.com wrote:
> I need to Call a PERL script on OTHER SERVER from MY SERVER and get
> the file generated there back to MY SERVER
> Can you please suggest how can i do that?


Something like Net::SSH or Net::Rexec should do the trick.
Arjun Mallik

2004-09-27, 3:57 pm


Hai
Thanks for the suggestion. But my code is returning below error. can
you please help me out.

CODE:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
#!/usr/bin/perl
use Net::Rexec 'rexec';
$rc, @output) =3D rexec(nakula, hello.pl, omc);
print "result of the command is $rc \n";
print "@output\n";
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D


ERROR:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
neptune:/m/home/omc (110) omc% perl remote.pl
Can't locate Net/Rexec.pm in @INC (@INC contains:
/opt/XXXnms/lib/perllib /opt/XXXnms/lib/perl5/5.6.1/PA-RISC2.0
/opt/XXXnms/lib/perl5/5.6.1
/opt/XXXnms/lib/perl5/site_perl/5.6.1/PA-RISC2.0
/opt/XXXnms/lib/perl5/site_perl/5.6.1 /opt/XXXnms/lib/perl5/site_perl
/opt/XXXoss/pf3party/perlna/src/wperli/XXXnms/lib/perl5/5.6.1
/opt/XXXoss/pf3party/perlna/src/wperli/XXXnms/lib/perl5/5.6.1/PA-RISC2.0
..) at remote.pl line 2.
BEGIN failed--compilation aborted at remote.pl line 2.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Arjun


-----Original Message-----
From: Bob Showalter [mailto:Bob_Showalter@taylorwhite.com]=0D
Sent: Monday, September 27, 2004 8:15 PM
To: Mallik Arjun (WT01 - TELECOM SOLUTIONS); beginners@perl.org
Subject: RE: Remote execution & FTP


arjun.mallik@wipro.com wrote:
> I need to Call a PERL script on OTHER SERVER from MY SERVER and get=0D
> the file generated there back to MY SERVER Can you please suggest how=0D
> can i do that?


Something like Net::SSH or Net::Rexec should do the trick.



Confidentiality Notice=0D

The information contained in this electronic message and any attachments to=
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or=
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or=
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
Bob Showalter

2004-09-27, 3:57 pm

arjun.mallik@wipro.com wrote:
> Hai


Hi. Top-post please.

> Thanks for the suggestion. But my code is returning below error. can
> you please help me out.


....

> Can't locate Net/Rexec.pm in @INC (@INC contains:


You need to install the Net::Rexec module. Read

perldoc perlmodinstall
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com