|Syntactic Confectionery Delight|
Random data generation.by BrowserUk (Pope)
|on Jun 26, 2010 at 02:13 UTC||Need Help??|
BrowserUk has asked for the
wisdom of the Perl Monks concerning the following question:
I want to generate strings of length N, draw from a set of M chars, but with no more than two of any given char consecutively.
I don't know whether this is tougher than it first appears, or I'm just having a bad head day. but my attempts so far involve cumbersome loops with the setting and resetting of myriad flags.
Any thoughts on a clean way to do this?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.