in reply to Net::Telnet timeout fails

Have you checked the return error message from Net::Telnet? You can check the error message with the following code:

printf "%s\n", $telnet->errmsg();
Which version of Net::Telnet are you using? The version I am using is 3.03. The following is an extract from the module -

## Connect to server, timing out if it takes too long. eval { ## Turn on timer. local $SIG{"__DIE__"} = "DEFAULT"; local $SIG{ALRM} = sub { die "timed-out\n" }; alarm $timeout; ## Lookup server's IP address. $ip_addr = inet_aton $host or die "unknown remote host: $host\n"; ## Create a socket and attach the filehandle to it. socket $self, AF_INET, SOCK_STREAM, 0 or die "problem creating socket: $!\n"; ## Open connection to server. connect $self, sockaddr_in($port, $ip_addr) or die "problem connecting to \"$host\", port $port: $!\n"; }; alarm 0;
The module code will try to resolve the host IP before making a connection with inet_aton, create socket, and connect to the specified server.

Now that explains why the call to open does not wait for 10 seconds on invalid addressed, because as soon as the host resolution fails, the evalutation block will terminate (with alarm trigger reset) at the line die "unknown remote host: $host\n";.

I suspect this is the cause for your problem. Check the $telnet->errmsg() nevertheless to see what's the reason for the failure.