does something like%hash = EXPR;
my @anon = LIST; %hash = (); while (@anon) { my $k = shift(@anon); my $v = shift(@anon); $hash{$k} = $v; }
So if you have two values for the same key, the latter prevails.
(There's no actual @anon created; the stack is used.)
In reply to Re^2: Throw compilation error(or warning) if duplicate keys are present in hash
by ikegami
in thread Throw compilation error(or warning) if duplicate keys are present in hash
by I_love_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |