in reply to Re: Help with Time
in thread Help with Time

Thanks. I might consider doing it that way. I don't have any experience with perl tho. I didn't create the script, rather im modifying an existing one. The download files are very small and I havent experienced any problems yet. What if I just wanted to change the existing one instead of having two separate tasks? Understanding I might have some downloading issues, is there still a way I can do this?

Replies are listed 'Best First'.
Re^3: Help with Time
by pc88mxer (Vicar) on Apr 20, 2008 at 17:27 UTC
    As apl suggests, there are several modules on CPAN to manipulate dates and times. One is DateTime which you could use like this:
    use DateTime; my $d = new DateTime(year => 2008, month => 3, day => 31); my $yesterday = DateTime->today()->add(days => -1); while (1) { my $year = $d->year; my $month = $d->month; my $day => $d->day; ... download file for $year, $month, $day ... last if ($d->ymd('/') eq $yesterday->ymd('/')); $d->add(days => 1); }
      Thanks I'll give that a try. The one its using right now is Time::Local i believe.