in reply to loop da loop chomp chomp loop chomp blurp oops

Your for loop opens a file then the foreach loop writes all the $lines in @row_data.
Move the open statement inside the foreach loop, and discard the for loop. That should get you going.

Software speaks in tongues of man; I debug, therefore I code.
Stop saying 'script'. Stop saying 'line-noise'.