I suspect that if both words have 5 characters, a declaration that the words have 5 characters in common, with different words, may be unexpected.
The case where the words are equal is a special one in the original code and results in $words_equal being returned. Given that fact, I think that 5 would be expected.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Re: Optimizing a string processing sub
by sauoq
in thread Optimizing a string processing sub
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |