note
devslashneil
The <a href="http://theoryx5.uwinnipeg.ca/CPAN/data/perl/Tie/File.html">Tie::File</A> module can be used to bind an array to a file.
<br><br>
Any changes you make to the array are then made retrospectivly to the file, without having to load the file into memory.
<br><br>
This is especially useful for large files<br>
ex.
<code>
#!/usr/bin/perl
use strict;
use Tie::File;
my @array;
my $filename = 'foo.dat';
tie @array, 'Tie::File', $filename or die "Error: Cannot open $filename\n";
push @array, "Hello, World!\n";
</code>
1880
1880