because IO::Socket::INET6 is installed IO::Socket::SSL will use this as base class. IO::Socket::INET6 tries to get an IPv6 address first (e.g. DNS AAAA record), while ping etc often try IPv4 only (there is usually a ping6 to for IPv6). So if your IPv6 setup is broken you might not realize it with IPv4-only tools. Please check:
- dig outlook.office365.com AAAA - this should give you IPv6 addresses. If you don't have IPv6 it should give no records at all and NOERROR, but some broken resolvers return NXDOMAIN instead
- if you get an IPv6 address try to connect to it, e.g. perl -MIO::Socket::INET6 -e 'IO::Socket::INET6->new("[2a01:111:f400:9800::6]:993") or die $!' If you get an error your IPv6 setup is broken, e.g. the resolver returns IPv6 records even you cannot reach hosts by IPv6