Help for this page

Select Code to Download


  1. or download this
    use IO::Socket::INET;
    
    ...
    OK
    Simple testing perlmonks.org:81
    ERR - Could not connect socket on port 81
    
  2. or download this
    sub test_port_detailed {
        my ( $server, $port, $timeout, $verbose ) = @_;
    ...
        $sock->close();
      return $errors ? "ERR - $errors" : 'OK';  
    }