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: <%-{-{-{-<
|