The last question used the syntax sigil %hash->{key} = 1; for hash access, which seems to work fine, but I would have thought it would be a syntax error.
It seems to work for arrays too:
my @array; @array->[3] = 6;
Is this behavior documented somewhere? I donβt remember reading it, but maybe I didnβt pay attention to it.
It seems to behave in exactly the same way:
(\%hash)->{key}
and not what I would suggest:
(scalar %hash)->{key}
source share