Perl cpan module to execute multiple commands -



Perl cpan module to execute multiple commands -

net::ssh::expect allows login remote router , run commands.

is there way run these commands in single line.

i mean there way execute 3 commands listed below 1 single variable $cmd instead of using $cmd1, $cmd2, $cmd3 ls, configure , exit respectively.

my $cmd1 = $ssh->exec("ls"); $cmd2 = $ssh->exec("configure"); $cmd3 = $ssh->exec("exit");

for remote login following:

my $ssh = net::ssh::expect->new (host => "ip addr", password=> 'pwd', user => 'username', raw_pty => 1);

similarly there way execute commands?

perl mod-perl

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -