in reply to Re: Checking Server Availability
in thread Checking Server Availability

OK, sounds like lots of folks think IO::Socket and/or IO::Socket::INET is the way to go. So is this the kind of thing you recommend?

use IO::Socket; use IO::Socket::INET; my $socket = IO::Socket::INET->new( PeerAdr => $my_server, PeerPort => 'ftp(21)', #might be http(80) someday Proto => 'tcp'); my $is_connected = $socket->connected(); $socket->shutdown(2); if(!$is_connected){ #go back to sleep } else{ #do some stuff }