in reply to Determining what line a filehandle is on
Basically I am 99% sure you just want to increment a counter and keep track of the line number yourself. Since the file will open at the beginning and read one line each time the while statement loops, a simple $line++ statement inside that loop should be sufficient.
In addition to checking that open succeeded, I'd also recommend adding \n to the end of your print statement..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Determining what line a filehandle is on
by Anonymous Monk on Jul 08, 2001 at 20:37 UTC |