in reply to print and extract the line

Change
while ()
to
while (<FILE>)
and it'll work just fine.

Replies are listed 'Best First'.
Re^2: print and extract the line
by ww (Archbishop) on Jul 07, 2010 at 15:05 UTC
    The read will work, but that won't solve OP's (ill-specced) problem.