我是Perl脚本的新手。我正在尝试远程SSH到Linux机器和我的代码如下:
my $hostname = "something.xyz.abc.com";
my $uid = "userid";
my $pwd = "pass";
my $ssh = Net::SSH::Perl->new($hostname);
$ssh->login($uid, $pwd);
my($stdout, $stderr, $exit) = $ssh->cmd("ls -l");
print $stdout;
我看到
的原因是什么“使用带有多个点的字符串时使用未初始化的值(。)”
警告?如何避免/抑制它?这些多点是否会产生问题?
具体的错误信息是:
Use of uninitialized value in concatenation (.) or string at C:/Dwimperl/perl/site/lib/Net/SSH/Perl/Key.pm line 13, <$fh> line 57.
Use of uninitialized value $blob in split at C:/Dwimperl/perl/site/lib/Net/SSH/Perl/Key.pm line 41, <$fh> line 59.
Use of uninitialized value $ssh_name in hash element at C:/Dwimperl/perl/site/lib/Net/SSH/Perl/Key.pm line 42, <$fh> line 59.
Use of uninitialized value in subroutine entry at C:/Dwimperl/perl/site/lib/Net/SSH/Perl/Key.pm line 45, <$fh> line 59.