while() { # this is the "Biiiiigggg Sequence" $targetseq = $_; print "$targetseq\n"; chomp($targetseq); open(F2,"<$file2") or die "Error opening $file2: $!"; while() { # probe sequences (25 base) substr($_,0, 25); $probe = $_; chomp($probe); if ($targetseq=~ /.*$probe.*/) { *this is Line 29 $start = index($targetseq, $probe); push(@matchregion,$start); } } $indexes = @matchregion;