in reply to Re: Content Length
in thread Content Length

I'm trying to obtain the content length in bytes or lines for google.com, or any other site specified

Replies are listed 'Best First'.
Re: Re: Re: Content Length
by FamousLongAgo (Friar) on Nov 11, 2002 at 14:47 UTC
    Take a look at LWP, along with the associated HTTP::Request, HTTP::Response, and HTTP::Headers object
    use LWP; use HTTP::Request; my $ua = LWP::UserAgent->new(); my $request = HTTP::Request->new( GET => 'http://www.google.com' ); my $response = $ua->request( $request ); my $headers = $response->headers(); print $headers->header( 'Content-Length');