Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Downloading a lot of files

by ihb (Deacon)
on Jun 23, 2005 at 23:47 UTC ( [id://469568]=note: print w/replies, xml ) Need Help??


in reply to Downloading a lot of files

&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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://469568]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-19 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found