So, do you think the problem is with reading the data into a datastructure?
What happens if you add the raw data present in the incorrect associations, and add it to your sample input, does the program produce the wrong associations?
What if you repeat the sample input" so it adds up to about 2000 lines, does the program produce incorrect associations then?
There is a bad assumption somewhere in the program, you just have to find it ...
Maybe you can spot the problem if you dump the vars at various points, dd(\%T) ... knowing what should be in your vars at each point in your program , is how you're going to solve this :) its easier to track with a minimal amount of raw input
sub dd {
use Data::Dumper;
print Data::Dumper->new([@_])->Sortkeys(1)
->Indent(1)->Useqq(1)->Dump . "\n";
}
|