in reply to Re^2: Case Statement
in thread Case Statement
It appears that $array[0] is the field name and that you're using regular expressions to get case insensitivity. If that's the case, you could let too much junk through since your switch statement is looking for words with any matching substring. You might instead just change your code to map things to upper or lower case for the comparison, like:
Also, you should quit putting quotes around your variable references. It slows things down, and can cause you some problems. For example, check the result of the following line when @lotid contains 0, 2, 4.switch (uc($array[0])) { case (uc("Time_Stamp")) { @time = split (/-/, $array[1]); $date_submited = $time[0];
...roboticus$wafer_flow = "$lotid[1]-$lotid[2]";
|
|---|