标题: 为什么在waitfor时候出现pattern match read eof at test_telnet.pl line 63 [打印本页] 作者: Aaron.Gao 时间: 2006-01-17 08:59 标题: 为什么在waitfor时候出现pattern match read eof at test_telnet.pl line 63
my $telnet_hdl=new Net::Telnet (Timeout => 1800, Prompt => '/[\$%#>:]\s*$/');
$telnet_hdl->open(Host=>$ip,Timeout=>60);
$telnet_hdl->login($user, $password);
...
...some operate
...
$telnet_hdl->print("exit");
($cmd_result_msg1,$match1)=$telnet_hdl->waitfor(Match=>'/Connection closed by foreign host./',Timeout=>60);
print "$cmd_result_msg1";
print "$match1\n";
$telnet_hdl->close;
复制代码
为什么在waitfor时候出现pattern match read eof at test_telnet.pl line 63
我查了Telnet.pm的waitfor,呵呵 实在是没看懂,谁能帮我解释一下
return $self->error("pattern match read eof") if $s->{eofile};