#!/usr/bin/perl use strict; use warnings; my @ar1 = (["one", "two"], ["three", "four", "five"]); my $count = scalar @{ $ar1[1] }; print "count: Elements in 2nd Row = $count\n"; print "number of dimensions =", scalar @ar1, "\n"; my $total_elements; foreach my $row_ref (@ar1) { $total_elements += @$row_ref; } print "total elements in array:ar1=$total_elements\n"; __END__ count: Elements in 2nd Row = 3 number of dimensions =2 total elements in array:ar1=5