B
bjlockie
I have this at the beginning of a sub ($checkDate is an input parameter).
I want to check for exactly 8 digits.
This works for less than 8 but doesn't work for more than 8.
if ($checkDate !~ /^\d{1,8}/) {
return "Date ($checkDate) must be YYYYMMDD\n";
}
I want to check for exactly 8 digits.
This works for less than 8 but doesn't work for more than 8.
if ($checkDate !~ /^\d{1,8}/) {
return "Date ($checkDate) must be YYYYMMDD\n";
}