why not load the data into an array and access the array when ever you want instead of keeping the fh openThere can be many reasons for not doing that. The most compelling one, which I face almost daily, is that my files often have hundreds of millions of lines. They simply do not fit in memory. And the files I am writing to usually have similar size.
Even with smaller but still quite large files, it is usually faster to read the file line by line and process each line, rather than copying the data into an array, process each item of the array and then write back the modified array lines
In reply to Re^4: How to tokenize a RTF file and print it to another file (Update with solution)
by Laurent_R
in thread How to tokenize a RTF file and print it to another file
by mdavies23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |