note
crouchingpenguin
<p><i>...you cannot just edit a file in place...</i></p>
<p>This has been coming up a lot recently. See [cpan://Tie::File]:</p>
<p><i>
<b>"Tie::File" represents a regular text file as a Perl array.</b> Each element in the array corresponds to a record in the file. The first line of the file is element 0 of the array; the second line is element 1, and so on.
The file is not loaded into memory, so this will work even for gigantic files.
<b>Changes to the array are reflected in the file immediately.</b>
</i></p>
<p>For an example of changing a file in place using [cpan://Tie::File], see [155567|this node] and [282885|this node].</p>
<br>
<a href="http://www.perlmonks.org/index.pl?node_id=197321">cp</a><br>
----<br>
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."
283580
283583