use strict; use LWP::Simple; use POSIX; my %image_url; for my $e_w ( qw/eastconus westconus/ ) { for my $typ ( qw/ir vs wv/ ) { $image_url{$e_w.$typ} = "http://www.goes.noaa.gov/GIFS/" . uc(substr($e_w,0,1)) . 'C' . $typ . '.JPG'; } } my $timestring = strftime( "%Y%m%d_%H%M%S", localtime ); print $timestring; for my $img ( keys %image_url ) { my $status = getstore( $image_url{$img}, join( '.', $img, $timestring, 'jpg' )); print join( "\n", $img, $image_url{$img}, $status, "\n" ); }