#!/usr/bin/perl # # This should really open a better known port (still TCP and stream) # in case it's Apache that is choking. # use IO::Socket; use strict; my $s; my $host = "dba.earlham.edu"; if (!($s = new IO::Socket::INET (PeerAddr => $host, PeerPort => '80', Proto => 'tcp', Type => SOCK_STREAM, Timeout => 5))) { print "failure\n"; exit 1; } close($s); # # If we get to here things are ok at this level. # print "success\n"; exit 0;