in reply to Telnet Script exits if any of the machine is un-accessible

I think you'll want to change the errmode to be return. By default, the errmode is set to die.

Basically, change you connection line to be something like:

$telnet = Net::Telnet->new(Host =>"$x",timeout=>13,errmode=>return);

Then you'll need to check $telnet to determine if it was able to successfully connect or not. Check the documentation of Net::Telnet for more details on this.

Replies are listed 'Best First'.
Re^2: Telnet Script exits if any of the machine is un-accessible
by Anonymous Monk on May 30, 2012 at 13:31 UTC
    You can user nmap instead of all these things.It would be better for you. nmap -p9090 172.16.177.103 | grep 9090 | awk '{print $2}' .This is an Example for that