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)


Reply via email to