in reply to take 'n' array elements at a time
Doesn't sound too demanding computationally. Create a routine that reads n number of records from a given file, adding all the values and dividing by n. Then run it for every file you're interested in.
In Section
Seekers of Perl Wisdom