I'm reading my way through a large (18GB) text file, then seeking to the start of the file again for re-reading (I don't want to close and re-open the filehandle).
I'd like to give some feedback about how far through the file I am, so I'm checking the value of $. and printing every millionth line, as a check using unless($. % 1000000). When I seek to the start again, $. is not reset, so different lines are printed. So I'd like to set $.= 0 just before my seek(FILE,0,0). Is assigning to $. considered bad form, or inadvisable? I'd prefer not to use my own variable to keep track of line count - it seem neater to use the built-in one.