If your intention is to simply determine if or not TCP opens on a port (i.e. you don't care about the protocol being transmitted on TCP), this can be done simply with TCP Ping (which just establishes TCP and then closes the connection).
Example:
use AnyEvent::Ping::TCP; my $t = tcp_ping '10.0.0.2', 1235; my $result = defined $t ? "OK" : "Failed"; print $result."\n";
In reply to Re: Perl Script to Test Telnet Connectivity
by sectokia
in thread Perl Script to Test Telnet Connectivity
by redapplesonly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |