in reply to Hash_of_Hash_Would do it?

Let me see if I correctly understand what this file is trying to represent before trying to give any further advice:

You have, in effect, a hash mapping a name to an array of hashes, where the key to the array is 'pos' (starting at 1, not 0), and the hash inside the array contains 'gc', 'score' and 'present_absent'.

If you parsed each line via something like:

my ($name,$pos,$gc,$score,$presentabsent) = parse($current_line);
you would end up with assignments like:
my @posarray; my %clsdata; $posarray[$pos] = { 'gc' => $gc, 'score' => $score, 'present_absent' = +> $presentabsent }; $clsdata{$name} = \@posarray;

Then you want to loop through all of your %clsdata hashes, and for each one, loop through the posarray, and for each member:

  1. If the key is <= 8 and present_absent is nonzero, set present_absent to 1
  2. If the key is >8, check the present_absent values for all keys from key-8 to key+8, and if they are all nonzero, set the present_absent value for that key to 1 (question: what do you do when key > $#posarray-8?)
  3. If the key == $#posarray and the value is 0, then set the value of key-8 to 1, otherwise leave it alone.

Is that about what you're looking to do? Can you be more specific about exactly which part you're having trouble with?

Update: Or, grandfather can completely solve your problem while I'm still working out what the question is, heh.