Why are you still asking the question before trying something on your own? Or, if you have tried something, why did you not show that to us?
If you are reading the data one "record" at a time (as suggested in the previous thread), you can keep track of the byte offsets at the start of each record (offset to first record is 0, offset to second record = length of first record, and so on). If you read the file line-by-line instead, you can store the byte offsets at the beginning of each line. In either case, the byte offsets should probably be values in a hash that are keyed by whatever indexing string will be used to choose a location in the file.
Then, if you really do need to go back to a specific location in the file, use seek() with the appropriate byte offset. Naturally, if your goal is to write back to the file (changing its contents at specific locations), things will be more complicated, and you probably just want to rewrite the whole file from your initial hash structure that stores all the file data.
In reply to Re^3: Reading selected portion of a data file
by graff
in thread Reading selected portion of a data file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |