http://qs321.pair.com?node_id=464745


in reply to Re^2: Reopen file when contents changed?
in thread Reopen file when contents changed?

When you open a file you have a pointer that points at the first line of the file. So I was just suggesting the OP might want to try just dupelicating that pointer and not changing what it points to while the original file pointer loops through the rest of the lines of the file reading in the data. I am slightly new to perl not sure if it would work. Hence it would be a static pointer, one that does not change, which is all the OP needs a constant pointer to the first line of the file. This would only be usefull if he isn't adding any information to the top of the file because the pointer would then not be pointing to the correct line.