#---------------------------------------------------------------------- # 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"} }