How do I get the total items in an array, NOT the last id?
None of two ways I found to do this works:
my @a; # Add some elements (no consecutive ids) $a[
Maybe you want a hash instead (or in addition). Arrays are an ordered set of elements; if you create $foo[23], you implicitly create $foo[0] through $foo[22].
$foo[23]
$foo[0]
$foo[22]