in reply to Perl script comes out because of a command failure. How to overcome it?
From the Net::Telnet documentation:
Errors such as timing-out are handled according to the error mode action. The default action is to print an error message to standard error and have the program die.
Try adding the line:
$t->errmode("return");
before the while loop. This should prevent the script from dying. See the entry for “errmode” in the “METHODS” section of Net::Telnet. (This also shows how to retrieve the error message when a command fails.)
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|