in reply to Looping Over Hash Skips an Element?
I'm wondering why you need a hash. You are indexing anyway so why not just have two arrays, one for the keys and one for the values.
Another thing I notice is that your keys contain an index. Why not use that number as the index for an array that holds the values? When you need to print you can add the Gi3 part in the print statement. An array would let you do the sum of 8 (or more) values at a time. $sum=$a[$n]+$a[$n+1]+ ... You could use a c style for loop to iterate through every 8th index.