&mirror could be handy here.
use strict;
use LWP::Simple;
use File::Slurp qw/ read_file /;
my $upgrade_file = './upgrade.log';
my $url = 'http://download.fedora.redhat.com/pub/fedora/linux/core/4/i
+386/os/Fedora/RPMS/';
for (read_file($upgrade_file)) {
chomp;
print "Checking $_... ";
my $status = mirror($url . $_, $_);
print $status == RC_OK ? 'downloaded'
: $status == RC_NOT_MODIFIED ? 'already downloaded'
: "error: $status";
print "\n";
}
print "Download complete.\n";
ihb
See perltoc if you don't know which perldoc to read!