In addition to the key-value pairs accepted by IO::Socket, "IO::Socket::INET6" provides. Domain Address family AF_INET | AF_INET6 | AF_UNSPEC (default) #### If "Domain" is not given, AF_UNSPEC is assumed, that is, both AF_INET and AF_INET6 will be both considered when resolving DNS names. AF_INET6 is prioritary. #### (Concrete to IPv4 protocol) $sock = IO::Socket::INET6->new(PeerAddr => 'www.perl.org', PeerPort => 'http(80)', Domain => AF_INET , Proto => 'tcp');