in reply to "or" or "||" problems
What you want (from your post, I hope I am not misreading it): is to check if the date string is the way you want or is empty. What you conditional states is: if the date string is not the way I want OR $_ is NOT EQUAL to '' then set the $Flag variable
What I think you want is: if the date string is not the way I want AND then $_ is not equal to '', then set the flag.
if (! /\d{4}\-\d{2}/-/d{2}/ and $_ ne '')
or
unless ( /\d{4}\-\d{2}/-/d{2}/ or $_ eq '')
Update: As posted below, you will want to look at the regex as well, as I unfortunately did not bother to check to make sure that was working when I was looking at your code (and hence made no modifications to it). Thanks tachyon
-enlil
|
|---|