in reply to Re^3: reading a line from file two times
in thread reading a line from file two times
seek(FH, (0 - length($line)+tell(FH)), SEEK_CUR);
You are seeking too far back. You're seeking back the length of the string plus the byte-number of your current position...If you wish to use tell() to record the old position before your read, then you'd use: seek(FH, $old_position, SEEK_SET); instead.
-Paul
|
|---|