Hi,
I have 2 files, one INDEX which has a list of line numbers, one at a line
for example
1145
3453
4534
345
3
456
.
.
.
The second file contains data.
I am wondering whats the best way to write a perl script which replaces "foo" with "bar" on the line numbers mentioned in the index file?
The method I currently thought up will be CPU intensive, i.e. parsing the data file multiple times.
For example if index as 100 entries, I will parse the data file 100 times.
Big data file means inefficient processing.
I think using sort, and some kind of partial processing will help here better?