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.
In reply to Re: syntax issue
by kennethk
in thread syntax issue
by sueme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |