>Люди добрые помогите! sub dl_cvd_file {
<------>my $file = shift;
<------>my $version = shift;
<------>
<------>use Net::HTTP;
<------>my $s = Net::HTTP->new(
<------><------>Host=>$dbMirror,
<------><------>KeepAlive=>1,
<------><------>SendTE=>1,
<------>) or die "dl_cvd_file(): Can`t connect: ".$@;
<------>
<------>$s->write_request(
<------><------>GET=>"/".$file.".cvd",
<------><------>'User-Agent' => "ClamavMirror/0.9",
<------><------>'Range'=> "bytes=0-512",
<------>) or die "dl_cvd_file(): write_request() failed for $file";
<------>my($code, $mess, %h) = $s->read_response_headers;
<------>die("dl_cvd_file(): mirror not support Range requests") if $code == 200;
<------>die("dl_cvd_file(): request response != 206, $code $mess") if $code != 206;
<------>
<------>my $buf;
my $n = $s->read_entity_body($buf, 512);
die "read failed: $!" unless defined $n;
die "can`t get 512 bytes" if $n!=512;
my $cvd = split_cvdtext($buf);
...
}
от копипаста сам почисть..