Fellow Monasterians:
I know how to find the size of an array: $# or $#$, but what if it's part of something like this:
$self->session->param('item' => [ 'indiv_conf', 'organ_conf', 'comp_co +nf' ] );
I want to iterate over each of the 3 elements in the array associated with 'item', but not sure how. Something like:
for ( 0..$#$self->session->param('item')) { print $self->session->param('item')->[$_].'\n'; }
But we know that's not right. Comments?
In reply to Finding size of an array in an HoA by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |