N
Nene
My variable $main::newvar , which holds a very long command will not
print to screen after '$ssh->run_ssh() or die "SSH process couldn't
start: $!";'
#!!/usr/bin/perl -w
use strict;
my $ssh = Net::SSH::Expect->new (
host => "xxxxxxx",
password=> 'xxxxxx',
user => 'xxxxxx',
raw_pty => 1
);
print "$main::newvar\n", br; #### It prints here...
# now start the ssh process
$ssh->run_ssh() or die "SSH process couldn't start: $!";
$ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt not
found after 3 second";
print "$main::newvar\n", br; It DOES NOT print here.....
Any help will be greatly appreciated.
print to screen after '$ssh->run_ssh() or die "SSH process couldn't
start: $!";'
#!!/usr/bin/perl -w
use strict;
my $ssh = Net::SSH::Expect->new (
host => "xxxxxxx",
password=> 'xxxxxx',
user => 'xxxxxx',
raw_pty => 1
);
print "$main::newvar\n", br; #### It prints here...
# now start the ssh process
$ssh->run_ssh() or die "SSH process couldn't start: $!";
$ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt not
found after 3 second";
print "$main::newvar\n", br; It DOES NOT print here.....
Any help will be greatly appreciated.