When this script got mentioned in the chatterbox today, a bunch of us Monks were on it
like ants on jello. In order to even out the server requests I thought a randomizing rendition
of the script might help. Subjectively it does seem my fetches (over dialup connection) ARE
going a little faster with it. Thus, this:
#---------------------------------------------------------------------
+-
# Based on perl code d/l from Perlmonks node: 329407
# View Original At:
# http://www.perlmonks.org/?node=329407&displaytype=displaycode
#---------------------------------------------------------------------
+-
use strict;
$|++;
use LWP::Simple;
my($file,$url,%potenpics);
my @models = qw(
ana angela bridget carolyn elsa fernanda
frankie jessica jessicaw marisa may melissa
molly noemie petra veronica yamila
);
for my $model (@models) {
for my $id (0 .. 15) {
$potenpics{"$model-$id.jpg"} =
sprintf "http://s.a.cnn.net/si/features/2004_swimsuit/" .
"images/gallery/popup/%s_%02d.jpg", $model, $id;
}
}
while (($file,$url) = each %potenpics)
{
print "$url => $file: ";
unless (-e $file and -s _) { print +mirror($url, $file), "\n" }
else { print "skipped, already exists\n"}
}
|