(above caveats on harvesting the images) but just for sake of example here's a bash one liner:
for n in `seq 0 99` ; do wget http://us.i1.yimg.com/us.yimg.com/i/us
+/we/52/$n.gif ; done
Also, instead of get() and open/print/close, can just use LWP::Simple's getstore() method:
use LWP::Simple;
use strict;
use warnings;
for my $index (0 .. 99) {# actually 47 is the last index
print "downloading $index.gif\n";
my $res = getstore("http://us.i1.yimg.com/us.yimg.com/i/us/we/52/$
+index.gif", "weather$index.gif");
}
or just:
perl -MLWP::Simple -e 'getstore("http://us.i1.yimg.com/us.yimg.com/i/u
+s/we/52/$_.gif", "weather$_.gif") for 0 .. 99'
|