in reply to Re^2: Length of multidimensional array based on the particular index value
in thread Length of multidimensional array based on the particular index value

it would have to be: do { $length++ if $_->[2] } for @select;

Can also be:

$_->[2] and $length++ for @select;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^4: Length of multidimensional array based on the particular index value
by jwkrahn (Abbot) on Feb 24, 2011 at 10:48 UTC

    And since $_->[2] is either 0 or 1 you could do:

    $length+=$_->[2] for @select;