the main problem i see with this code is the following:
push @lines;
this line does nothing, so the @lines array is always empty
whe you attempt to print its contents. what you probably
wanted is:
push @lines, $_;
also, you are testing the equality of a numeric variable
against an integer with eq which is the string
equality operator, as opposed to == the
numeric one.