Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^8: Urgent Help For Perl Issues

by salva (Abbot)
on Mar 18, 2013 at 08:30 UTC ( #1023989=note: print w/replies, xml ) Need Help??


in reply to Re^7: Urgent Help For Perl Issues
in thread Urgent Help For Perl Issues

yes, post your code, otherwise nobody is going to guess what you are doing wrong!

Replies are listed 'Best First'.
Re^9: Urgent Help For Perl Issues
by arvindninestars (Initiate) on Mar 18, 2013 at 09:01 UTC
    Two Different Codes i Posted here...Please check...
    #!/usr/bin/perl #use strict; #use warnings; use Net::SSH::Perl; my $host = "XXXX"; my $user = "XXXX"; my $password = "XXXX"; my $path = "/XXXX"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $password); my($stdout, $stderr, $exit) = $ssh->cmd("cd $path"); ($stdout, $stderr, $exit) = $ssh->cmd("tar -xvzf XXXX.tar.gz");
    or
    #!/usr/bin/perl #use strict; #use warnings; use Net::SSH::Perl; my $host = "XXXX"; my $user = "XXXX"; my $password = "XXXX"; my $path = "/XXXX"; my $cmd = "tar -xvzf XXXX.tar.gz"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $password); my($stdout, $stderr, $exit) = $ssh->cmd("cd $path && $cmd");
      with code tags, please:
      <c> your code here! </c>
        #!/usr/bin/perl #use strict; #use warnings; use Net::SSH::Perl; my $host = "XXXX"; my $user = "XXXX"; my $password = "XXXX"; my $path = "/XXXX"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $password); my($stdout, $stderr, $exit) = $ssh->cmd("cd $path"); ($stdout, $stderr, $exit) = $ssh->cmd("tar -xvzf XXXX.tar.gz"); or #!/usr/bin/perl #use strict; #use warnings; use Net::SSH::Perl; my $host = "XXXX"; my $user = "XXXX"; my $password = "XXXX"; my $path = "/XXXX"; my $cmd = "tar -xvzf XXXX.tar.gz"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $password); my($stdout, $stderr, $exit) = $ssh->cmd("cd $path && $cmd");

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023989]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2017-03-25 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (310 votes). Check out past polls.