4 ms·
It has nothing to do with sigils. It has to do with the legacy of arrays and hashes only storing scalars in ancient Perl. Perl 6 does not flatten by default.
by SwellJoe 18y ago
It has nothing to do with sigils. It has to do with the legacy of arrays and hashes only storing scalars in ancient Perl.
Perl 6 does not flatten by default. (And, obviously, sigils remain a core part of the language.
- benmathes 18y agoShort answer: Don't write $a->[0]->[0]->[0]->[0]->[0], write $a->[0][0][0][0][0]. It does the same thing. Long answer: As for writing code, however, you don't need to write $a->[0]->[0]->[0]->[0]->[0]. After the first dereference (if any), you can omit the '->'s because arrays and hashes only store scalars so perl knows you're talking about a reference. You can use all the arrows for backwards compatibility.
- william42 18y agoThe legacy of arrays and hashes only storing scalars is pretty much because of sigils.
- SwellJoe 18y agoCitation needed.