in reply to Max dimensions of multi-dimensional array
my @array = [];
BTW, I don't know what you expected the quoted statement from the OPed code to do, but what it does is to initialize @array with a single element: a reference to an empty anonymous array.
c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dump qw(dd); ;; my @array = []; dd \@array; ;; $array[2][3] = 1; $array[3][4] = 2; $array[2][6] = 10; ;; dd \@array; " [[]] [ [], undef, [undef, undef, undef, 1, undef, undef, 10], [undef, undef, undef, undef, 2], ]
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Max dimensions of multi-dimensional array
by ravi45722 (Pilgrim) on Jul 14, 2016 at 04:39 UTC |