in reply to date validation module

Any of the popular date modules allow this, AFAIK. Pick one of them and learn how it works. (DateTime, Date::Calc, Date::Manip, etc.)

To do it with only core modules, try something like (untested):

use Time::Local "timegm"; sub bad_date { my ($y,$m,$d) = @_; ! defined eval { timegm(0,0,0,$d,$m-1,$y) } }
(update: added missing defined)