in reply to Handling User Input

What you want is to have only one place where input is accepted and then many checks that all return to that one place if they find fault:
while(1) { $date = <>; ... if (...) { print "was wrong"; next; } if (...) { print "was very wrong"; next; } if (...) { print "totally wrong"; next; } last; }

Now almuts suggestion is a step further than this. She suggests putting this into a subroutine and use 'return($date)' instead of the 'last'. That would do exactly the same but would be even more readable