While i do appreciate wanting to learn the intricacies of a particular tool, in this case i'd just get a different tool. Tie::File
Tie::File even has built-in flocking.use strict; use warnings; use Tie::File; tie my @file, 'Tie::File', 'messageTest.txt' or die "can't open\n"; my $MAX = 5; if (@file > $MAX) { @file = @file[0 .. $MAX - 1]; unshift @file, "new line"; }
Thanks to Corion for alerting me that i linked to File::Array ... oops :)
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: lack an adequate understanding of (at least) the seek function
by jeffa
in thread lack an adequate understanding of (at least) the seek function
by o2bwise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |