Still the error is same. Following is the code
#! /usr/bin/perl; # perl module to parse the AVMInstall.log file for errors use lib "/home/cgadgil/usr/net/ssh/perl"; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new(avm-qa-cam2.cisco.com); $ssh->login(cgadgil, cgadgil); my($stdout, $stderr, $exit) = $ssh->cmd(ls); Please help. Regards Irfan. -----Original Message----- From: Sandeep Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 3:27 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: Execute the Linux command on remote machine Irfan J Sayed (isayed) wrote: > Hi All, > > I want to execute one command on remote Linux machine. > > Following is the perl code. > > #! /usr/bin/perl; > > # perl module to parse the Install.log file for errors > > use lib "/tmp/"; > use Net::SSH::Perl; > my $ssh = Net::SSH::Perl->new(avm-qa-cam2.net.com); > $ssh->login(cgadgil, cgadgil); > my($stdout, $stderr, $exit) = $ssh->cmd(ls); > > Actually i want to parse the log file for errors which is on the > remote machine. so i want to execute some commands on remote machine. > for example ls I have copied the Perl.pm in the /tmp folder but still > i am getting @INC error. > Can't locate Net/SSH/Perl.pm in @INC (@INC contains: /tmp/ > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi > > Please suggest. > > Regards > Irfan. > > > > > you can better make a ~/usr , and copy the package there and use lib "/home_dir/usr/net/ssh/perl", you cannot have use lib "~/net/ssh/perl", this does not work(for me, it didn't). sandeep. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/