in reply to
what is the purpose of Tie::File
Having a glitch of some kind---code is coming:).
Here:
#!/usr.bin/perl -l
BEGIN {
$| = 1;
$^W = 1;
}
use strict;
use autodie;
use warnings;
my $file = "file.txt";
1 while unlink $file;
use Tie::File;
my $o = tie my @lines, 'Tie::Tile', $file, memory => 0;
for (@lines) {
$lines[2] = "something else is here now';
print $lines[2];
#line 3 is now "something else is here now".
}
END {
undef $o;
untie @lines;
1 while unlink $file;
#clears and empties everything.
}