I cannot figure out how to build an array of variable length
#incomplete sub wall { $count = 0; while ($count < $ pieces) { $count +=1; @stripe =(); } $wall_height = user input is 50 $stripe= user input is 11 $pieces=int($wall_height/$stripe); # pieces 50/11 = 4 #this the answer I want to come up with $stripe[0]= "11" $stripe[1]= "22" $stripe[2]= "33" $stripe[3]= "44"
next question: making a second set of stripes posted in direct replies by redmustang
In reply to Building an array, "stripes on a wall" by redmustang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |