in reply to Replace a line with a new one
Why does your code loop through the whole array when the index is known?
After Compline,Zaxo