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

i have two file.one is 'result'

AAA41250.1...........PF0000005.3 PF11001.3 PF00389.24 PF10417.3 AAA60129.1...........PF00389.24 PF11001.3 CAA00125.1...........PF00002.3 CAA79652.1........... CAB58510.1...........PF00389.24 PF0000005.3

and i have another file 'domainlist'

PF0000005.3 PF11001.3 PF00389.24 PF10417.3 PF00002.3

as you said i am already studying perleftut, but still nothing :-(

Replies are listed 'Best First'.
Re^5: array references
by Anonymous Monk on Jul 29, 2011 at 20:48 UTC

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

      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.