Re: Looping thru file with 'gets()' fails to retrieve last record
- Posted by Bernard Ryan <xotron at bluefrog.com> Aug 05, 2004
- 447 views
John F Dutcher wrote: > > I have an Ascii text file in the cgi-bin with exactly 3,772 records in it. > > I have tried the two approaches below to read it.....both fail to return > the last record before posting a '-1' to the file handle. Both return > exactly 3,771 records instead of 3,772 ?? John: The first record in a file starts a zero offset. Are you sure you are counting from the first record. Bernie My files in archive: http://www.rapideuphoria.com/w32engin.zip http://www.rapideuphoria.com/mixedlib.zip http://www.rapideuphoria.com/eu_engin.zip http://www.rapideuphoria.com/win32eru.zip