I am writing a text file, where I'm substituting characters on the fly. For example I'm using an array with a split and replacing spaces of my string for '%2B'. At the end of each line (for loop) I want to reset the array so it will start over. It's doing much more than that, but I hope you understand my goal. Can someone please point out my mistake (or the obvious)?