$ remote-> waitfor('/ Logoff /');Perl telnet登录
我得到的错误有时会说服务器不可用时模式匹配超时。我想处理这个错误。每当发生这种错误,我想让我的脚本睡1分钟,并尝试重新登录。
我已经tryied是这样的:
if($remote->waitfor('/Logoff/'))
{
#proceed login perform intended operations.
}
else
{
sleep(60);#control is not coming here. returning pattern match timed-out error.
}
Aaaaand,当你尝试它时发生了什么? – 2012-07-30 07:43:24