This does not solve the prerequisite that the OP needs to access the list of file counts from an external source in between runs.
Also, there's no reason to have to use so many arrays and trickery. The following will remove the oldest addition after the array reaches a length of eight, and add a new one to the bottom of the list:
my @a = qw(1 2 3 4 5); for (1..5){ shift @a if @a == 8; push @a, 'new data'; } print "$_\n" for @a;
In reply to Re^4: Rolling variable
by stevieb
in thread Rolling variable
by artperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |