say scalar grep{ $_->[2] } @select; #### my $length; $length++ if $_->[2] for @select; say $length;