for (@list) { if (! /\d{4}\-\d{2}\-\d{2}/ or $_ eq '') { die 'The date fields MUST be filled out correctly!', $/; } }