# $from = $current_line[2]-8; # $to = $current_line[2]+8; # for ($from .. $to){ # push (@range, $_); # } # } # foreach my $pos (@range){ # if ($pos == $position1) { # substitute with if ($position1>=$current_line[2]-8 and $position1<=$current_line[2]+8) {