A socket operation attempted to an unreachable network...
Reinstalling perl is unlikely to have any effect whatsoever on the status of your internet connection. I would presume that you're seeing the effects of a firewall, router, or the like as opposed to a malfunctioning perl install.
Try opening the relevant port on your router, firewall, et all as appropriate and try the code again.