do { print "Enter Date. For Ex: 10-01-08 \n"; chomp($date = ); } while ($date =~ /0[1-9]|1[0-2]-0[1-9]|1[0-9]|2[0-9]|3[0-1]-0[8-9]|1[0-9]/);