The stupid question is the question not asked | |
PerlMonks |
Re: Complicated Hash Construction.by pg (Canon) |
on Dec 29, 2002 at 04:33 UTC ( [id://222849]=note: print w/replies, xml ) | Need Help?? |
You can declare an entity, but not a member of an entity. This is what the syntax error is about. In your bad case, you tried to declare my @hash{@keyarray}, which is an element of an entity. It is NOT about the fact that you combined a declaration with an assignment. This is fine: and this is not fine: This is also no good:
In Section
Seekers of Perl Wisdom
|
|