For the task of pulling files off websites you don't need to fiddle with Socket calls the library - LWP::UserAgent does that for you. I am not sure what exactly you want to do. Why do you need to use low level Socket calls when you use LWP::UserAgent?
Update: Perhaps you have problem with the address - you have it as a number - while the UserAgent needs the dotted string?