P is for Practical | |
PerlMonks |
Re: cryptquote solverby blakem (Monsignor) |
on Jun 29, 2003 at 10:33 UTC ( [id://269980]=note: print w/replies, xml ) | Need Help?? |
I did a similar thing once upon a time. Instead of writing one regex to match the wordmask, I calculated the wordmask for each dictionary word and compared it to the given word.
Its probably less efficient than your approach, but it was
easier to write.
Since wordmask() is a non-trivial subroutine I've included a few tests for it... Run it like so: % match_word.pl abcdee
-Blake
In Section
Seekers of Perl Wisdom
|
|