argv has asked for the wisdom of the Perl Monks concerning the following question:
fooo bar baz foo bar baaz foo bbar baz [etc]
Here, I'm looking for off-by-one errors. Extra bonus for a function that matches if it's off by an arbitrary N. That is, a function that returned the number of characters that were different between the strings rather than just a binary true/false.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: off-by-one string comparison
by Zaxo (Archbishop) on Jun 05, 2005 at 17:42 UTC | |
Re: off-by-one string comparison
by bobf (Monsignor) on Jun 05, 2005 at 17:46 UTC | |
Re: off-by-one string comparison
by crashtest (Curate) on Jun 05, 2005 at 19:15 UTC | |
Re: off-by-one string comparison
by TedPride (Priest) on Jun 05, 2005 at 22:12 UTC |