Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elemen
In Perl 5 (to be changed in Perl 6) a sigil indicates the context of your expression.
$hash{key}. $array[0]. However, as pointed out by zigdon, slices are legal. They interpret the those expressions in a list context.
@hash{key} worksBut also larger lists work as well, like @hash{qw.
You want a couple of slots out of an array @array[0,3,5..7,$n..$n+5] works
@array[0] is a list of size 1. There is no "hash context", so neither %hash{@keys} nor %hash{key} has meaning.
So you have "@" + "array[0]" <=> < sigil = context > + < indexing expression > as the complete expression.