http://qs321.pair.com?node_id=662240


in reply to finding all combinations

Just because it uses List::Comprehensions which I recently discovered and absolutely love:

use List::Comprehensions;; comp1 { print join '-', @_ } [1,2,3], [7,8], [1,5,23,3];; 1-7-1 1-7-5 1-7-23 1-7-3 1-8-1 1-8-5 1-8-23 1-8-3 2-7-1 2-7-5 2-7-23 2-7-3 2-8-1 2-8-5 2-8-23 2-8-3 3-7-1 3-7-5 3-7-23 3-7-3 3-8-1 3-8-5 3-8-23 3-8-3

Or if you prefer:

comp1 { print join '-', reverse @_ } [1,5,23,3], [7,8], [1,2,3];; 1-7-1 2-7-1 3-7-1 1-8-1 2-8-1 3-8-1 1-7-5 2-7-5 3-7-5 1-8-5 2-8-5 3-8-5 1-7-23 2-7-23 3-7-23 1-8-23 2-8-23 3-8-23 1-7-3 2-7-3 3-7-3 1-8-3 2-8-3 3-8-3

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.