Here's one I hacked up a while back when faced with a similar (distribution-only) constraint. I had the particular problem of often needing to see only the response header. Hence the -h option. It isn't foolproof, but it gets the job done.
#!c:/perl/bin/perl.exe
# get.pl -- Make an HTTP GET request and report the results
#
# Dave Smith, 6/15/00

use strict;
use IO::Socket;

my $get_or_head = "GET";

my $headeronly = 0;
if ( $ARGV[0] eq "-h" ) {
    $headeronly = 1;
    $get_or_head = "HEAD";
    shift;
}

my $url = shift or usage();
my ($host,$uri) = $url =~ m#^(?:http://|//|)([^/]*)/?(.*)$#;
# print "host=$host uri=$uri\n";
usage() if not $host;


my $sock = IO::Socket::INET->new(PeerAddr => $host,
                                 PeerPort => 'http(80)',
                                 Proto    => 'tcp');
die "Couldn't open socket to $host" if not $sock;
print $sock "$get_or_head /$uri HTTP/1.0\r\n",
            "Accept: text/plain, text/html, text/xml, image/gif\r\n",
            # "If-modified-since: Sat, 14 Jul 2000 01:51:07 GMT\r\n",
            "Host: foo.com\r\n",
            "\r\n";

while ( <$sock> ) {
    s/\r//;
    last if $headeronly and /^$/;
    print;
}


sub usage {
print <<"END";
usage:
    $0 [-h] fully-qualified-URL

        -h response header only
END

    exit(0);
}


In reply to Re: Grabbing a web page without LWP or the like by dws
in thread Grabbing a web page without LWP or the like by Hot Pastrami

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.