Slightly off topic but.. I dont know if this possible with your situation, but it may make more sense to put the growing file into a database and write reports out of the database that extract the needed data.
Just a thought from a different point of view. On 7/15/05, Octavian Rasnita <[EMAIL PROTECTED]> wrote: > Hi, > > I need to create a program which reads a file from the LAN, and that file is > continuously updated (kind of log). > The file increases continuously, and it can become very big. > > On every read, I need to read just the lines for the current day (which is > specified in each line) and jump over the lines from the previous days. > > The problem is that if I just open() the file and verify each line to see if > it is a good one, takes very much time, and I need to find a faster > solution. > > Checking each line might take a long time, but I think that verifying each > line means downloading the whole content of the file on my computer, and > this will also make the program lose much time. > > Do you have any idea what can I do to make the program run faster? > > I am thinking to make the program in such a way that after the first run, it > gets the line number of the first line from the current day, or the number > of the first bit of the start of that line, then on next times it runs, it > jumps directly to that line somehow (?), or directly to that bit (using > seek), but I don't know if in that case the content of the file won't be > also downloaded to my computer. > > Do you have any idea how I can download just a part of a file from the > network? > > Help! > > Thank you. > > Teddy > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>