in reply to open a socket and print from stdin....i think

I think you should look into the LWP modules. It will simplify this for you greatly by removing all of the networking complexity for you. Here is an example:
use LWP::Simple; # insert your code to populate @lines here foreach my $url (@lines) { my $content = get($url); }

-----------------------------------
Frank Wiles <frank@wiles.org>
http://www.wiles.org