in reply to Re^5: array references
in thread array references

Read through Basic debugging checklist. I'd bet the issue is that @AoA doesn't contain what you think it does. Specifically, because there is no white space between what looks like the first two entries in AAA41250.1...........PF0000005.3 PF11001.3 PF00389.24 PF10417.3, the first element (PF0000005.3) is getting dropped in your split. Perhaps my @chunks = split /\s+|\.{2,}/; would work better for you.

I suspect that this is not the balance of your bugs, but if you follow the steps in Basic debugging checklist and use Data::Dumper judiciously, you should be able to get this resolved.