I have a program with an enormous array which I'm using as a queue. So I started using Tie::File to get around my memory problem. But oddly it still continues to chew up memory. So I wrote a small snippet to test the problem (see below) Am I extremely confused? Can someone point out where I missed something. I added the flush in the hope that the cache was not working properly, but I didn't notice a big change. It just keeps eating memory.
#!/usr/bin/perl
use Tie::File;
my @item;
my $dbuncheck = tie (@item,'Tie::File','test',memory => '100000') or d
+ie $!;
for (1..10000) {
push @item,'stuff' x 40;
$dbuncheck->flush;
}