Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: Is it possible to use key/values of a Hash/Hash ref while it's being initialized?by merlyn (Sage) |
on Sep 14, 2005 at 21:54 UTC ( [id://492045]=note: print w/replies, xml ) | Need Help?? |
the current hash being initializedThat hash is necessarily empty until the entire value on the right (the map) is completely computed. You can't start shoving values into there because you can't alter the existing data, or else things like this woudn't work: In this case, you can't start altering @a during the map, because @a might be getting shorter, and then you wouldn't have the right values on the right. -- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|