- or download this
for my $i (0 .. length($str1)) {
if (substr($str1, $i, 1) ne substr($str2, $i, 1)) {
$val++;
}
}
- or download this
my $step = 5;
my $bound = int (length($str1) / $step);
...
$val++;
}
}
- or download this
for my $i (0 .. $bound) {
my $substr1 = substr($str1, ($i * $step), $step);
my $substr2 = substr($str2, ($i * $step), $step);
...
}
}
}