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.
In reply to Re^2: Using map to create a hash/bag from an array
by bart
in thread Using map to create a hash/bag from an array
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |