Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
odc
· 1y ago · 0 comments
In Perl -> is the dereference operator, similar to C.
So when you see
$a->[2]{"bar"}
then $a is an array reference where each item is a hashmap. But with
$a->[2]->{"bar"}
then $a is an array reference where each item is a reference to a hashmap.
Comments
[–]
zaucker
1y ago
$a->[2]->{"bar"} is the same as $a->[2]{"bar"} or as $a->[2]{bar}