in reply to The biggest value in array 2 dimensin

If you have an array @a, using it in a scalar context gets the number of elements:

my @a = ( 3, 1, 4, 1, 5 ); my $N = @a; say $N; # or print "$N\n; before 5.10 my $aref = \@a; $refsize = @$aref; # or @{$aref}; say $refsize;

For a multidimensional array, you wind up with a reference to the inner array, so use the ref example:

my @twoD = ( [ 1, 2, 3 ], [ 4, 5, 6 ], ); print "Top level or array has " . scalar @twoD . " elements\n"; for my $row ( @twoD ) { print "row has " . scalar @$row . " elements\n"; }

As Occam said: Entia non sunt multiplicanda praeter necessitatem.