may i know how to ( in Perl ) ,
generate below All Possible Patterns in a file and on screen output , and each slot in the pattern can be accessed , ?!
many thanks for all ,
input value ,
1 , no. of slots ,
2 , no. of objects ,
for example ,
no. of object = 2 , { a , b } ,
no. of slots = 4 ,
then , output ,
no. of all possible patterns = 2^4 = 16 ,
then ,
row is 16 ,
column is 8 ,
eachSlot[i][j] = allow assign or change its value ,
then , output format look like ,
a a a a
a a a b
a a b a
a a b b
a b a a
a b a b
a b b a
a b b b
b a a a
b a a b
b a b a
b a b b
b b a a
b b a b
b b b a
b b b b
and ,
if see 'a' , then do sth actionX ,
if see 'b' , then do sth actionY ,
many thanks for all the advices and helps ,
question from:
https://stackoverflow.com/questions/65949608/in-perl-how-to-generate-all-possible-patterns 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…