Depends on the context and what follows. In a scalar context:
$y = @{$x};
it will return the number of elements in the array to which $x is a reference.
In the context of the list:
@y = @{$x};
it will return the elements of the array.
If followed by [LIST] :
@{$x}[1,42]
it creates a slice of the array, a list of the specified elements in the array to which $x is a reference.
If you follow {LIST} :
@{$x}{ 'foo', 'bar' }
it creates a hash slice, a list of values ββfor the specified keys in the hash, to which $x is a link.
Link to links
Note that the {} around $x not related to the {} used to build the anonymous hash, they are code block delimiters. If what is in them is a simple scalar variable, they can be skipped; if they are not omitted, they may contain an arbitrary expression or even several statements that return a link at the end.
source share