John Macdonald skribis 2004-11-28 12:24 (-0500):
> Doesn't that cause ambiguity between:
> %hash{'foo'}{'bar'}{$foo}[0]{$bar}
> and
> %hash{'foo'}{'bar'}{$foo}{0}{$bar}
> ^ ^ hash instead of subscript
Not really. $hashref[] can't be used and $arrayref{} can't be used. This
means Perl can easily disambiguate.
Only for types that have both [] and {}, there is a problem. When they
are both possible, just define one to have precedence. I'd pick {}.
Exactly the same rule should apply for autovivification: {}.
Juerd