I whipped this together to grab web pages on a daily basis:
use strict;
use LWP::Simple;
use Time::localtime;
use File::Basename;
open (DATA, "urllist.txt") || die "File open failure!";
while (my $downloadurl = <DATA>){
(my $name, my $path, my $suffix) = fileparse($downloadurl);
my $finurl = $downloadurl;
print $finurl."\n";
my $lt = localtime();
my $now_string = $lt->mon." ".$lt->mday;
my $savefilename = $now_string.$name.$suffix;
print $savefilename;
print "\n";
my $status = getstore($finurl,$savefilename);
print $status."\n"
}
<\code>
Re:small change to get suffix working properly
scot on 2007-01-02T21:11:09
What platform are you running this on? Mine is WinXP SP2.