in reply to Works on W10, but not on Debian

Perhaps IO::Socket::SSL isn't installed? (It comes preinstalled with Strawberry Perl.) If you're using the system Perl, try sudo apt-get install libio-socket-ssl-perl, otherwise try cpan IO::Socket::SSL (you might need to do sudo apt-get build-dep libio-socket-ssl-perl).

Update: Added a bit more info.