%hash; # a hash $hash{$foo} = 'bar'; # used in scalar context @ary = qw(foo bar baz); $hash{@ary}++; # key is scalar(@ary) here: $hash{3} == 1; @hash{@ary} = (1,2,3); # hash is now (foo=>1,bar=>2,baz=3) @hash{@ary}++; # $hash{baz} == 4; # why? #### @hash{@array} = (1) x scalar(@array);