I'm going to hope that this is a question I didn't need to ask, but in the text file, do you have the items one per line, or do you have them all on one line, and separated by commas (like you show for the variable)?
I tested my script, using a text file with one item per line, and it worked exactly as expected.