in reply to Rolling variable

You can use Tie::File to store your data in a file, and use push and shift per Ratazong's suggestion on the array which modifies the file live-time:

use Tie::File; tie my @file, 'Tie::File', 'file.txt' or die $!; shift @file if @file == 8; ... push @file, 'new data'; ... untie @file;

Then, use cron to run your script every hour, and for any other external processing, just pull the data out of the 'file.txt' file.

-stevieb