Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Word Unscramblerby Posthumous (Scribe) |
on May 03, 2006 at 15:58 UTC ( [id://547188]=note: print w/replies, xml ) | Need Help?? |
This is a late comment, but I hope not out of place. My daughter and I were working on a Jumble puzzle with a word we just couldn't crack. So, of course, I decided to throw the Perl wrench at it. As I thought about the algorithm, regular expressions just seemed like a natural choice. I have to say this solution amazed me (I admit it, I'm not an experienced or professionally educatued programmer). I mean look at: 12 lines! And the solution -- how clever! Rather than looking for a match, it eliminates non-matches. I've learned something here. OK, so I needed to solve a jumble, not find all possibilities. Two quick changes to one line, and I'm off:
Great post, great solution. Thanks jonnybe
In Section
Cool Uses for Perl
|
|