P is for Practical | |
PerlMonks |
Re: Date::Manip and dateby Athanasius (Archbishop) |
on Jul 09, 2015 at 10:20 UTC ( [id://1133929]=note: print w/replies, xml ) | Need Help?? |
First, a single array element should be written like this:
and not like this:
The latter is an array slice. The warnings pragma would have told you this. You should always start your script with:
This will save you a lot of time and trouble in the long run. Second, Date::Manip::ParseDate interprets your dates as MM/DD/YYYY, not DD/MM/YYYY. So 1988-12-13 becomes the twelfth day of the thirteenth month of 1988 — which does not exist. You need to swap the first and second array indices:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|