Hi,
Is there any other way to carry out this in Perl w/out using this module? I got it printing out the values correctly thanks to both your replies. But now I realized I can't specify the date range values.
For example if I altered the code like this, it makes an error:
use Date::Calc::Iterator;
# This puts all the dates from Dec 1, 2003 to Dec 10, 2003 in @dates
+1
# @dates1 will contain ([2003,12,1],[2003,12,2] ... [2003,12,10]) ;
my $sr = "2005,07,1";
my $i1 = Date::Calc::Iterator->new(from => [$sr], to => [2005,10,1])
+ ;
my @dates1 ;
push @dates1,$_ while $_ = $i1->next ;
foreach my $v (@dates1) {
print "@$v<br>";
}
Since I used the scalar inside the from brackets, it prints an error saying this:
Invalid start date at C:/Perl/site/lib/Date/Calc/Iterator.pm line 25.
Thank you lots, Erold
|