is not what you might think it is, as single element lists get flattened. To get what you mean you must writemy $a = [[["hello"]]]; #not a 3d array!, same as: ["hello"]
Note the trailing comma. See also 2015 The Year of The Great List Refactor.my $a = [[["hello"],],]; #now it is!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [Perl 6]: Small discoveries VII, Flattening
by QM (Parson) on Oct 31, 2017 at 10:15 UTC | |
by Anonymous Monk on Oct 31, 2017 at 14:22 UTC | |
by Anonymous Monk on Oct 31, 2017 at 16:51 UTC | |
by Anonymous Monk on Oct 31, 2017 at 17:08 UTC | |
|
Re: [Perl 6]: Small discoveries VII, Flattening
by Anonymous Monk on Oct 30, 2017 at 15:24 UTC | |
|
Re: [Perl 6]: Small discoveries VII, Flattening
by Jenda (Abbot) on Dec 29, 2017 at 21:58 UTC |