Setting up an internet connection is probably out of scope for here. What do you mean by "load a file"? My guess is that you want to grab a web page, in which case you should take a look at
LWP::Simple, although note that there might be easier (depending on your specific needs) command-line solutions using things like lynx, wget, curl, ftp.