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:
you would end up with assignments like:my ($name,$pos,$gc,$score,$presentabsent) = parse($current_line);
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:
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.
|
|---|