in reply to Letter by letter

That indeeds looks stupid. The loop will never terminate, as the middle expression, $i=1 will always be true. It's probably not your intention, but then, you aren't saying what you want to do.