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

c:\@Work\Perl\monks>perl -wMstrict -le "printf qq{%#02o \n}, ord 'l'; printf qq{%#02o \n}, ord 't'; printf qq{%#02o \n}, 0154 ^ 0164; " 0154 0164 030

... 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] ...
[please note the emphasized addition]

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 reply to Re^4: Comparing Lines within a Word List by AnomalousMonk
in thread Comparing Lines within a Word List by dominick_t

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.