sarshads has asked for the wisdom of the Perl Monks concerning the following question:
Thanks.#!/usr/bin/perl use IO::Socket; $socket = IO::Socket::INET->new(Proto=>"udp", PeerPort=>"162", PeerAdd +r=>"192.168.1.1") || 1000; if($socket==1000) { print "Port Closed"; } else { print "Port Open"; } close($socket);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking Port Open or Close
by JavaFan (Canon) on May 14, 2010 at 09:39 UTC | |
|
Re: Checking Port Open or Close
by ikegami (Patriarch) on May 14, 2010 at 04:52 UTC | |
|
Re: Checking Port Open or Close
by ungalnanban (Pilgrim) on May 14, 2010 at 04:28 UTC |