The listToArray() function in ColdFusion 8 has three parameters: list, delimiters, and includeEmptyFields. With ColdFusion 9, there is now multiple delimiter support in the fourth parameter. However, there is also a behavior change in the default for includeEmptyFields. Consider the following:
arrayLen(listToArray(" "))
When executed on ColdFusion 8, the result is 1; on ColdFusion 9 it's 0. To make the new function produce the same result, it requires explicitly defining the includeEmptyFields parameter:
arrayLen(listToArray(" ", ",", true))
That code will return 1 in both cases. This difference was apparent in an interesting way, and it seemed that the mod operator was the cause. Consider this:
if (2 mod arrayLen(listToArray(" " & foo & " "))) then { // Do amusing things to foo }
When that conditional statement is executed on ColdFusion 9, the foo variable can't be empty because listToArray() will return zero, which will cause a division by zero exception.
Oh, and don't write a comment here that the same result could be achieved with listLen(), wise guy. This might also be documented in excruciating detail elsewhere; I don't claim to be breaking the news. I just thought it was interesting.