$ 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