in reply to Broken Date Handling

Perhaps it's an idea to avoid such an errorprone code and to use instead an existing module.
use Date::Calc qw/check_date/; check_date($year,$month,$day) or die "Invalid date";
Note, that also the year-1900 conversion isn't necessary any longer.