while($ansNum < $numOfAns) where $ansNum starts at zero and is incremented until it is at $numOfAns(from the split line above, it's value should represent the number of elements in @A). This all works, but I would like to improve it and make it so that the user making the text file doesn't have to enter, $numOfAns, and that instead I could find out the size of the @A array. Two main ways, but the easiest is $#A, which is the current max index of @A (= number of entries -1)
- Array Size Question(s) Bryce Tate
- Re: Array Size Question(s) Paul Cotter
- Re: Array Size Question(s) Collin Rogowski
- RE: Array Size Question(s) Peter Cornelius