How do I replace empty elements in the "OTHER" array?
My list (@degree) is built from SQL command. The NVL command in SQL does not work, nor tests like:
if (@degree[$i] == "")
if (@degree[$i] == " ")
if (@degree[$i] == '')
if (@degree[$i] == -1)
if (@degree[$i] == 0)
if (@degree[$i] == ())
if (@degree[$i] == undef)
$ i is a counter variable in the for loop. Basically it goes through and grabs unique degrees from the table and finishes creating ("AFA", "AS", "AAS", "", "BS")
. The list is not always that long, and the empty item is not always at this position 3.
Can anyone please help?
I want to either check during the for loop or after the loop finishes where that empty element is and then replace it with the word "OTHER".
Thanks for anything Ken
+1
source to share