FYI this bug seems to have been fixed somewhere between Strawberry Perl 5.36.1.1 and Strawberry Perl 5.38.0.1 (bug is present in 5.36.1.1 but not in 5.38.0.1, although both use same Socket module version 2.037).
So I guess it actually was an issue with Perl core ?