Re: read backwards

2001-12-12 Thread Andrea Holstein
[EMAIL PROTECTED]: > > Hi, > > I have an ASCII file, running in DOS. > It is not a fixed file length. > Its lines of data have various lengths. (some lines are empty). > > The program reads line by line(), and processes the lines. > At a certain line I need to read the next line, > check what i

Re: read backwards

2001-12-11 Thread Jeff 'japhy' Pinyan
On Dec 11, [EMAIL PROTECTED] said: >The program reads line by line(), and processes the lines. >At a certain line I need to read the next line, >check what its contents are, and then readjust >the file pointer back to the first line. Since its not a fixed length, its >difficult using seek(). W

read backwards

2001-12-11 Thread Murzc
Hi, I have an ASCII file, running in DOS. It is not a fixed file length. Its lines of data have various lengths. (some lines are empty). The program reads line by line(), and processes the lines. At a certain line I need to read the next line, check what its contents are, and then readjust the

Re: How to read backwards in a file.

2001-05-14 Thread Paul
--- Gary Luther <[EMAIL PROTECTED]> wrote: > I guess what I am asking is how in the Perl do you set the read > pointer?? Observe perldoc perlfunc. More specifically: perldoc -f tell perldoc -f seek Just store the address of the pointer after you hit a "node", then go back to the previous

How to read backwards in a file.

2001-05-14 Thread Gary Luther
I am learning Perl and loving it. Perl is cool...not as cool as APL but nonetheless cool. Here is my question. I have to read into a file for a particular string in a record. The "strings" occur in different records. I then call a subroutine and within the subroutine need to be able to r