in reply to Re^4: skip lines
in thread skip lines

Your code doesn't do the same as mine does. It doesn't read from the file in the header of the while-loop, for instance.

You also ignored what I wrote:

(Note: start off with an empty @input array).

So I suggest that you try to actually understand what originally posted code does, and then modify it to fit your needs. Don't try to mindlessly fit in the frame of the code you posted before.

Perl 6 - links to (nearly) everything that is Perl 6.