|There's more than one way to do things|
Trapping Error - Delta_Daysby Anonymous Monk
|on May 15, 2006 at 13:06 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I have a code that takes some input from the user on a specific date, but I am kind of lost when the user input is an invalid date like, 2005-02-31, my code crashes because I am using:
use Date::Calc qw(Delta_Days);
My question is on this part of code I have here, how can a trap the error efficiently before it gets to the Delta_days module.
Here is where the problem is:
Is got to be a way to prevent weird dates to come and crash my program.
Thanks a lot!!!!