![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Using map to create a hash/bag from an arrayby GrandFather (Sage) |
on Dec 17, 2005 at 10:41 UTC ( #517462=note: print w/replies, xml ) | Need Help?? |
The idiomatic way to do that in Perl is @hash{qw(a b c)} = (1) x 3;:
Prints:
DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|