in reply to Network or no network???... That is the question!
my $s = IO::Socket::INET->new( PeerHost => '10.0.0.1', PeerPort => 80, # or whatever port you want Timeout => 15, Proto => 'tcp', ); if( $s ) { close $s; # it's ok } else { die $!; # it's not }
|
|---|