sub string_distance { my ($a, $b) = @_; my @a = split //, $a; my @b = split //, $b; my $count = 0; for (my $i = 0; $i < length($a); $i++) { $count++ if ($a[$i] eq $b[$i]); } return $count; }
In reply to Re: Substr versus Regexp
by nornagon
in thread Substr versus Regexp
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |