@{$foo}
are introducing a code block, so you can do whatever you like in there, as long as it results in an appropriate reference.
If you are not yet subscribed, you can do it now. Free of charge:
This newsletter is about the Perl Programming languages.