Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Optimizing a string processing subby sauoq (Abbot) |
on Jan 08, 2003 at 21:18 UTC ( [id://225359]=note: print w/replies, xml ) | Need Help?? |
Here's another way to do it:
The real question is whether your code is actually doing what you expect. Your function is not commutative. For example, score('quuux', 'quack') does not return the same thing as score('quack', 'quuux') does. (The first is 4 the second is 2.) -sauoq "My two cents aren't worth a dime.";
In Section
Seekers of Perl Wisdom
|
|