Help for this page

Select Code to Download


  1. or download this
       my $req         = HTTP::Request->new(HEAD => $url);   
       my $resp        = $ua->request($req);
       my $type        = $resp->header('Content-Type');
       my $content     = $resp->content;   
       my $content_len = $resp->header('Content-Length');
    
  2. or download this
       my $req         = HTTP::Request->new(GET => $url); 
       my $content     = $resp->content;
       my $content_len = length($content);
    
  3. or download this
       my $req         = HTTP::Request->new(HEAD => $pl_url);
       my $resp        = $ua->request($req);
    ...
           $content     = $resp->content;  
           $content_len = length($content);
       }