foreach my $position1 (@{$file1{$key}}){
This array holds the position +/- 8 that you read from the first file. Then, further down in your code, you are also adding plus/minus 8 postions from the position you read from the second file.
foreach my $pos (@range){
So I believe that is why you are getting the redundant printout.
Chris
In reply to Re^3: Reading two files, cmp certain cols
by Cristoforo
in thread Reading two files, cmp certain cols
by sesemin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |