more useful options | |
PerlMonks |
Re^4: Comparing Lines within a Word Listby AnomalousMonk (Archbishop) |
on Apr 27, 2016 at 16:22 UTC ( [id://1161651]=note: print w/replies, xml ) | Need Help?? |
I hope everyone in the thread can see this, and not just the author of the note on which I hit the reply button. They can. I'm not immediately sure why the "difference" between the character 'l' and 't' would be 30 ... You're seeing the octal values resulting from the character-by-character bitwise-xor of two strings. So
... the problem ... [find] from ... a massive dictionary of English language words -- all pairs of words that are the same except for one letter, and in particular, for that character difference to be that one has an R while the other has an S [in the same character position] ... As to this much larger problem (as restated; please confirm this clarification — or may the differing characters be in any position? (Update: E.g., Is 'aSaa' a "match" for 'aaRa'?)): it's an interesting one, but I've no time right now to go into it in detail. Update: Actually, the '02' in the '%#02o' format specifier used in the printfs above is unnecessary, although it does no harm. The same result (and the result I wanted) can be had with '%#o' instead. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|