${ EXPR1 }[ EXPR2 ] is the dereference of the array index. It returns the element in the index returned by EXPR2 array referenced by the link returned by EXPR1 .
${ $array_ref }[ ... ] are $array[...] references, since $array[...] are arrays.
${ EXPR } , which does not follow [ or { , is a scalar dereferencing. It returns the scalar referenced by the link returned by EXPR .
${ $scalar_ref } refers to scalar links since $scalar refers to scalars.
As you can see, when working with a link, you can use the same syntax as usual, except that you replace the variable name with {$ref} (keeping the leading sigil).
Thus, @{ $array_ref } refers to arrays of links, since @array refers to arrays.
say @{[ qw(abc) ]};
This is the essence of the diagrams in my previous post Mini-tutorial: The dereferencing syntax . See also:
Oops, I thought you had
say ${[ qw(abc) ]};
You have
my $y = ${[ qw(abc) ]};
Do you want to
my $y = [ qw(abc) ];
[] creates an array and a link to this array and returns the last one, like
my $y = do { my @anon = qw(abc); \@a };
source share