I am using Net::Telnet module with my perl script. I give a list of routers to this script to login and retrieve output from those nodes.
Out of those three nodes i mentioned one node in middle of list which is not pingable or it really not exist on network.
For example consider below list of nodes
brtm502
biad502
bjae500
out of which biad502 is not pingable (or not exist on network).
when I run this script it stops and throwing below output and die at that point.
"unknown remote host: biad502 at unix-gsr-manual.pl line 70"
My requirement.
1/ Even if some node is not available in network the script should continue to next node and provide me output as expected excluding the node which is not on network.
I tried use below code but still same result.
$session->open("$node") ;
$session->errmode("return");
You’re setting the errmode after you tell Net::Telnet to make the connection. Either reverse the order or collapse the errmode setting into the ->open, using the extended invocation that you’ll find in the documentation.