in reply to Length of multidimensional array based on the particular index value
grep in scalar context... evil? It works.
say scalar grep{ $_->[2] } @select;
There's also 'for'
my $length; $length++ if $_->[2] for @select; say $length;
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Length of multidimensional array based on the particular index value
by Eliya (Vicar) on Feb 24, 2011 at 10:23 UTC | |
by BrowserUk (Patriarch) on Feb 24, 2011 at 10:33 UTC | |
by jwkrahn (Abbot) on Feb 24, 2011 at 10:48 UTC | |
by davido (Cardinal) on Feb 24, 2011 at 10:34 UTC | |
by jwkrahn (Abbot) on Feb 24, 2011 at 10:40 UTC | |
by Eliya (Vicar) on Feb 24, 2011 at 10:43 UTC |