3 ms·
...complex data in perl is much more effort than in say, python. Accessing the first element of the first element of a nested array in Perl 5: $aoa[0][0] A
by chromatic 16y ago
...complex data in perl is much more effort than in say, python.
Accessing the first element of the first element of a nested array in Perl 5:
$aoa[0][0]
Accessing the first element of the first element of a nested list in Python:
lol[0][0]
Perl 5 references do sometimes produce uglier syntax, but your quibble here is over a sigil.
- loewenskind 16y agoNested array, fine. Now try that with a hash of arrays of objects with an array member, the 3rd element. Python: hash['foo'][3].children[2] But it's instructive that you assume I'm talking about something as trivial as an array of arrays.
- chromatic 16y agoPerl 5: $hash{foo}[3]{children}[2]