http://www.perlmonks.org?node_id=70284


in reply to Re: Length of 2-dimensional array
in thread Length of 2-dimensional array

This could also be written as:
my $a; # a 2d-array my $count=0; for (@$a){ $count += $#$_+1; } print "My 2D-array is $count long\n";