Think about Loose Coupling | |
PerlMonks |
Re^5: Words in Wordsby sarchasm (Acolyte) |
on Sep 30, 2011 at 23:18 UTC ( [id://928960]=note: print w/replies, xml ) | Need Help?? |
It looks like both solutions will work! One thing I just realized from your post about sorting is that you only need to look at words that are longer than the current word (which you are sortof doing). This means that as the program runs, it actually becomes faster at finding the results. I ran each program for 1 minute and BrowserUk's code produced 320 records. Lotus1's code produced 150. Even though your code appears to run slower I imagine performance will improve the longer the process runs because it will have fewer records to look through each time. I will let the programs run over the weekend to see what I get. Thank you all for your help. I learned a lot from your examples and suggestions!
In Section
Seekers of Perl Wisdom
|
|