in reply to Re^2: doubt in string matching.
in thread doubt in string matching.
That is,@b[$i-($m-2)..$i-1]
Your first character according to your check should be in $b[3] and last character should be in $b[10]. So the in-between characters should be$i = 10; $m = 8;
But you are checking 3..10 again.@b[4..9]
Does this help you.for(my $j=($i-($m-2));$j<=$i-1;$j++) #or for(my $j=($i-($m-2));$j<$i;$j++)
|
|---|