in reply to Re: Cryptogram Solver
in thread Cryptogram Solver

First of all, I'm not a perl monk, so my coding style isn't quite as pretty as yours. I have to stare at stuff like:

return if grep /$let/,join("",values %seen);

for about 3 minutes before I say "ok, I know what you're doing, but I didn't know you could do that..." :)

I did find the bug in my code before I saw your solution, but yours is obviously more elegant. I just might steal your version. :)

As for using this as a brute force decrypter -- yes, it is easy in theory. But it takes me about 4 hours to code up the thing you just saw above. Writing the entire thing is not a trivial task for me.

Can you give me some tips on how I should approach the rest of the problem? So far, my approach has been pretty unelegant. What's the best way to recurse through all the possible words for each codeword? I have written a program that generates a partial cipher alphabet and compares two cipher alphabets to see how many entries mismatch. I'm concerned about doing the recursive part in a dumb way and eating up a ton of memory resources unnecessarily.

Thanks again for all your help guys.