use Net::HTTP; my $link = 'http://www.whateverlink.com'; $link =~ s/.+:\/\/(.+)/$1/ if ($link =~ /.+:\/\/.+/); my $s = Net::HTTP->new(Host => "$link") || 0; my $htmlcode = ''; if ($s) { $s->write_request(GET => "/", 'User-Agent' => "Mozilla/5.0"); my($code, $mess, %h) = $s->read_response_headers; while ($n = $s->read_entity_body($buf, 1024)) { $htmlcode .= "$buf"; } }