in reply to syntax issue

In the hash %h, the key a is associated with an array reference. Therefore, in order to access the values, the reference must be dereferenced using the @{...} syntax.

One reason you can't say "@${a}\n" is because you forgot the letter h, so that gets read as interpolating the dereferenced variable $a into the string. If instead you consider what you likely meant to type, "@$h{a}\n", the order of operations is problematic -- the array dereference @ gets applied before the hash access, so perl is looking for a nonexistant scalar $h. See perlreftut.

strict and warnings tells you as much for both these errors. Please read Use strict warnings and diagnostics or die.