in reply to Weird Date::Calc behavior; Bug?
You cannot assign a scalar to an array that way. You should instead split the scalar up like so:
Update: You can also do something like:#!/usr/bin/perl -w #find-missing-files.pl use strict; use Date::Calc qw ( Delta_Days Add_Delta_Days ); my (@start, @stop); @start = split (/-/, $ARGV[0]); print "@start\n"; @stop = split (/-/, $ARGV[1]); print "@stop\n"; for ( my $i = 0; $i <= Delta_Days(@start, @stop); $i++ ) { my @date = Add_Delta_Days (@start, $i); printf ("%4d-%02d-%02d\n", @date); }
$from =~ s/-/,/g; $to =~ s/-/,/g; @start = eval ($from); @stop = eval ($to);
Zenon Zabinski | zdog | zdog7@hotmail.com
In Section
Seekers of Perl Wisdom