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

there you go taking all my fun away!

Here's an awful contortion:

$_->[2]?length++:0 for @select;

Dave

  • Comment on Re^3: Length of multidimensional array based on the particular index value
  • Download Code

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:40 UTC
    $_->[2]?length++:0 for @select;

    Why are you trying to increment the length function?

Re^4: Length of multidimensional array based on the particular index value
by Eliya (Vicar) on Feb 24, 2011 at 10:43 UTC

    or even

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

    :)

    (the !! is only required if you don't want to make assumptions that a "true" value in $_->[2] is always represented as 1)