JykkeDaMan has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use Net::Telnet(); # ... # ... sub checkVersion { my $host = shift; my $telnet = new Net::Telnet(Timeout => 10, Prompt => '/-> $/', Errmode => "return"); if ( not $telnet->open($host) ){ # Telnet timeout for destination print "Telnet failed for address $host.\n"; $telnet->close; return 0; } # ... } for ( my $i = $ip_range_start; $i <= $ip_range_stop; $i++) { $host = "$ip_c_base.$i"; checkVersion($host); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet timeout fails
by Roger (Parson) on Oct 27, 2003 at 00:36 UTC | |
|
Re: Net::Telnet timeout fails
by Anonymous Monk on Oct 27, 2003 at 08:09 UTC |