The data are in parallel arrays because that is how the designer of the homework specified the problem. ;)
Perl offers several ways of managing data in that fashion and I expect there may be discussion of the pros and cons of each following the submission of answers. I'd hope too that your point is made - that is not a Perlish way to manage data in most cases.
In reply to Re^2: confused with summing certain elements from an array
by GrandFather
in thread confused with summing certain elements from an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |