in reply to Re: Using map to create a hash/bag from an array
in thread Using map to create a hash/bag from an array
Except, IMHO, the hash values are irrelevant. Codewise, it's easier to use undef as hash values: your
then becomes@hash{qw(a b c)} = (1) x 3;
@hash{qw(a b c)} = ();
That's a lot shorter, isn't it? And no need to count items.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Using map to create a hash/bag from an array
by GrandFather (Saint) on Dec 18, 2005 at 11:21 UTC |
In Section
Seekers of Perl Wisdom