You may find Why Questions go Unanswered useful. Just the act of getting rid of extraneous code that doesn't illustrate what puzzles you often will answer your question.
BTW I am curious about what you expected to happen when you assigned to @row. I would expect to replace the array each time. You?
Comment on Re: variables get overwritten (loop problem? i dunno)