in reply to Re^3: How to tokenize a RTF file and print it to another file (Update with solution)
in thread How to tokenize a RTF file and print it to another file
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to tokenize a RTF file and print it to another file (Update with solution)
by thanos1983 (Parson) on Jul 07, 2017 at 21:45 UTC |