Another word on the syntax: it's slightly wrong :-)
my %hash; @hash{qw(foo bar baz)} = 1 x 3; print "$_ => $hash{$_}\n" for keys %hash;
There should be parentheses around the '1':
@hash{qw(foo bar baz)} = (1) x 3;dave
Update: Oops, Ovid beat me to it by a couple of minutes!
In reply to Re: Set::Scalar saves you from hash acrobatics
by Not_a_Number
in thread Set::Scalar saves you from hash acrobatics
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |