I believe the OP wanted effectively to list the files in a directory, get the count of the number of files, and save this number in a file. Per my recommended approach (Tie::File), each line in the store file would contain an integer of the number of files. This file would have eight lines (one per hour apparently). After the file hits eight lines, the top one (oldest) gets shifted off, and the most recent goes to the bottom.
In reply to Re^10: Rolling variable
by stevieb
in thread Rolling variable
by artperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |