- 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');
- or download this
my $req = HTTP::Request->new(GET => $url);
my $content = $resp->content;
my $content_len = length($content);
- or download this
my $req = HTTP::Request->new(HEAD => $pl_url);
my $resp = $ua->request($req);
...
$content = $resp->content;
$content_len = length($content);
}