Also sprach fishfry:
This is a bit obscure and probably due to the special nature of the
digit variables ($1, $2...). You get an idea when you use B:
eparse to
see that for perl those two things are treated differently in a subtle
manner:
ethan@ethan:~$ perl -MO=Deparse -e 'print @{1}'
print @1;
-e syntax OK
ethan@ethan:~$ perl -MO=Deparse -e 'print @{11}'
print @{11;};
-e syntax OK
@{1} is condensed into @1. Strictures don't warn on certain symbols that
are always global and live in package main::. These are variables with
digits and punctuation as name (so you are always allowed to use e.g.
$`, @`, %` etc., even $2).
@{11} however is @{11;} which is a symbolic reference. That means the
block {...} is executed and whatever is returned is turned into a string
and taken as the name of the variable. These (also called soft
references) are disallowed when "strict 'refs'" are in effect.
Having said that, this different treatment of @{1} and @{11} is a bug
IMO.