in reply to about arrays...

It appends $date to the array.

Better would be:

push @weekly_date_list, $date;
Because this doesn't create a new list to replace the old.