#!/usr/bin/perl -w
#find-missing-files.pl
use strict;
use Date::Calc qw( Delta_Days Add_Delta_Days );
my (@start, @stop);
my $from = $ARGV[0];
my $to = $ARGV[1];
$from =~ s/-/,/g;
$to =~ s/-/,/g;
#@start = $from; print "@start\n";
#@stop = $to; print "@stop\n";
@start = (1999,05,27);
@stop = (1999,06,01);
my $j = Delta_Days(@start,@stop);
for ( my $i = 0; $i <= $j; $i++ ) {
my @date = Add_Delta_Days(@start,$i);
printf("%4d-%02d-%02d\n", @date);
}
####
./find-missing-files.pl
####
1999-05-27
1999-05-28
1999-05-29
1999-05-30
1999-05-31
1999-06-01
####
#@start = $from; print "@start\n";
#@stop = $to; print "@stop\n";
####
@start = (1999,05,27);
@stop = (1999,06,01);
####
./find-missing-files.pl 1999-05-27 1999-06-01
####
1999,05,27
1999,06,01
Usage: Date::Calc::Delta_Days(year1, month1, day1, year2, month2, day2) at ./test.pl line 19.