in reply to Count elements in multidimensional arrays

Paladin has already shown that you could have found your error yourself if you had used the pragmas "strict" and "warnings". Also note that a little extra whitespace to align your array definition can make it easier to read. That alone can help to avoid errors in accessing them.
use strict; use warnings; my @ar1 = ( ["one", "two", ], ["three", "four", "five", ], ); my $count = scalar @{ $ar1[1] }; print "count = $count\n";