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


in reply to number of rows in double dimension array

A two-dimensional array in Perl usually is an array of array references, so the number of rows is just the number of elements in the "outer" array:

my @dd = ( [ 11, 12, 13], [ 21, 22, 23], [ 31, 32, 33], [41, 42, 43], +); print "Number of rows: ", scalar @dd, "\n";