Harman has asked for the wisdom of the Perl Monks concerning the following question:
Now the contents of file 'myFile' & 'tempFile' should be same. But they are different. Some of the modifications I did on '@tieArray' are not reflected in 'tempFile'.
The problem is fixed when I increase the value of 'memory' parameter to 4Mib from its default value of 2Mib i.e
tie @tieArray, 'Tie::File', "myFile", memory => 4000000;
Can anybody suggest what is the problem in original scenario & how increasing the buffer size to 4Mib fixed this problem?
Note:
1)I am getting this problem when I tie huge files i.e 40 - 50 Mb. For small Files I don't get this kind of problem.
2) Modifications that I made to @tieArray are something like this:
$tieArray[100] .= "\n\nMy new inserted lines";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Query regarding 'Tie' file
by Corion (Patriarch) on Sep 09, 2008 at 11:42 UTC | |
by Harman (Initiate) on Sep 09, 2008 at 12:12 UTC | |
by Corion (Patriarch) on Sep 09, 2008 at 12:18 UTC | |
|
Re: Query regarding 'Tie' file
by Anonymous Monk on Sep 09, 2008 at 11:38 UTC |