Hi Monks,
I know that $#A returns the last index of an array @A. And scalar @A returns the number of items in an array @A. But if I have a multi-dimensional array of fields that looks something like this:
@A = ([0,1],[0,...,0],[1,...,1])scalar @A returns the number of items in the first field: 2. OK. $#A returns the last index in the first field: 1. Also OK.
But how do I find out how many zeros are in the second field? Or ones in the third field? I don't really care if its the index of the last item or the actual number of items. Like any good programmer I tried Googling the heck out of this but have come up empty handed.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |