in reply to work with Array of Arrays
use strict; use warnings; my @AoA=( [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ); print 'Number of rows = ', scalar @AoA, "\n"; for my $aref (@AoA) { print 'Number of cols = ', scalar @{$aref}, "\n"; } __END__ Number of rows = 3 Number of cols = 4 Number of cols = 4 Number of cols = 4
See also:
|
|---|