How are you expecting any content to get into the array @row? There is nothing in your code that puts anything in there.
Declaring all your variables at the start of your code is a very self destructive habit.
Declare all your variables as lexically scoped in the smallest applicable lexical scope unless you have a positive reason to do otherwise. (Note: this has nothing specifically to do with Perl - it applies in all programming languages).
If you followed this advice you would have been much less likely to have made the mistake. |