> Is there possible to create a n-number of lists in a cycle? > I.e. for (1..$n){ > my @R.$_; > } > or smth like this ... I know that 'my' will work only in this loop. So i am > waiting for the answer.
Do you mean an array of arrays? my @R; for (1..$n) { push @R, [ 1..$_ ]; } Here, each element is an array containing values 1 thru the element number: 0: (1) 1: (1, 2) 2: (1, 2, 3) etc. To access: $R[2][1] is "2" (remember, perl arrays are always zero-indexed). HTH. - Bryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>