generating a wordlist from an array of arrays



hey list. i stuck with gererating a wordlist from a changing
multidimensional array. each entry in the array contains a list with the
possible values.

fe:

@wordlayout = ((a, b), # possible values for 1st char
(c), # possible values for 2nd char
(d, e, f)); # possible values for 3rd char

the following wordlist should be generated:

acd
ace
acf
bcd
bce
bcf

the only thing i came up with so far, is to generate some for loops
based on the array structure (how many chars, with how many posible
values) on fly and pass this to eval. pretty ugly (at least the way i
thought it out).

any hints on how to solve this? probably using recursion but i got no
idea about it right now. and sorry for my bad english, hope i can make
my problem understandable.
.



Relevant Pages

  • Re: This question seems simpler than it actually is...
    ... find a lot of logic designers forget what HDL stands for... ... For the exercise I went ahead and did this with a 6 element array. ... type invect is array of entry; ... case mystate is ...
    (comp.lang.vhdl)
  • Re: A critique of test-first...
    ... > silly to give a coding test to people of our level; ... Each message will have the cummulative probability. ... To find a random message get a number from randand find the entry ... Use a sparse/dense array of chars. ...
    (comp.programming)
  • Re: A critique of test-first...
    ... > silly to give a coding test to people of our level; ... Each message will have the cummulative probability. ... To find a random message get a number from randand find the entry ... Use a sparse/dense array of chars. ...
    (comp.programming)
  • Re: Removing entry from @rray
    ... For some time I have been using two different method for removing an entry ... and places each line into the array. ... Redefining the @array element inside to loop ...
    (comp.lang.perl.misc)
  • Re: Framework 2.0 array redim unsatisfactory performance
    ... Not a surprise, most likely it is implemented as single-linked ... Implements the System.Collections.Generic.IListinterface using an array ... How are you determining "at least 5 additional bytes for each entry"? ... | The reason why I test Array is because I need a dynamic data structure ...
    (microsoft.public.dotnet.languages.vb)