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

for example PF0000005.3 has two neighbor PF11001.3 in first line and PF00389.24 in fifth line.

Replies are listed 'Best First'.
Re^6: array references
by kennethk (Abbot) on Jul 29, 2011 at 22:48 UTC
    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.