Just another Perl shrine | |
PerlMonks |
Re^3: possible combinations in sequenceby roboticus (Chancellor) |
on Jun 09, 2006 at 12:10 UTC ( [id://554479]=note: print w/replies, xml ) | Need Help?? |
ikegami: Thanks for the tip on the speed boost. Once I get the benchmarking stuff installed I'll play with it. While I do like your suggestion, I prefer the order that my method generates--all one-word combinations first, then the two-word combinations, etc.) Re: shoddy code. Yeah, I guess so, consider me properly admonished. ++ for calling me on it and keeping me honest. When I thunk up the technique to use, I just erased the original function body and started whacking away at it. I didn't think to clarify things by using better variable names. (Of course, I just came off of a little golfing trip so my head was in "trim keystrokes" mode.</lame_excuse_mode>) Now, I guess the proper thing to do is to clean it up a little and insert your suggestion, so here goes: <pedagogical_mode> </pedagogical_mode> --roboticus
In Section
Cool Uses for Perl
|
|