in reply to Perl Socket Connection Check

To check for socks, use Net::Proxy::Type.
#!/usr/bin/perl use strict; use warnings; use Net::Proxy::Type ':types'; my $proxytype = Net::Proxy::Type->new(); my $proxy = 'remotehost'; if ($proxytype->is_socks4($proxy)) { warn "$proxy is a socks4 proxy", "\n"; } elsif ($proxytype->is_socks5($proxy)) { warn "$proxy is a socks5 proxy", "\n"; } else { warn "$proxy is unknown", "\n"; }