Do you know where your variables are? | |
PerlMonks |
cryptquote solverby xChauncey (Scribe) |
on Jun 29, 2003 at 07:48 UTC ( [id://269975]=perlquestion: print w/replies, xml ) | Need Help?? |
xChauncey has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks, I'm trying to create a cryptquote solver as a bit of an academic exercise to learn more about various aspects of Perl. I've come across a roadblock, what I am trying to do is make a regex to check a dictionary file for words that match a pattern given by the encrypted word...Here is a piece of code to check one word against a dictionary file to see if it fits the pattern...(pattern is abcdee) I'm sure it is easy to see what I am trying to do here, but obviously I have something wrong. Once I get the regex right, I would like to dynamically generate the regex for each word and then map the results so that the next word only looks at words that match the letters seen for the last word (but that's the next phase). This will be a recursive process, so that if the prog hits a roadblock (from thinking that one of the words is something it really isn't) it will go back and try something else. This is something that I took on as a whim, and now I realize that it is much more complex than I thought. I'm still learning Perl though, and I think that taking on hard things is probably the best way to learn how to handle hard things... Any advice? XC
Back to
Seekers of Perl Wisdom
|
|