good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
RE: Re: Populating a Hash: Can someone help me to understand?by merlyn (Sage) |
on Sep 19, 2000 at 19:11 UTC ( [id://33101]=note: print w/replies, xml ) | Need Help?? |
You said:
And your code stops too quickly if either the key or the value is false. You updated: But even adding the defined test as you did doesn't help. Consider @keys = (1, 2, undef, 3, 4);. You'll never get to 3 or 4. What would work is:
-- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|