This might be a typo in shmem's code, but the value '1' should be in list context. There is no need for 'scalar' since the rhs of the x operator can only be a numeric scalar. So I prefer: @hash{@array} = (1) x @array; With a suitable comment, since it is not particularly obvious.
Comment on Re^2: postfix incrementing of hash slice
Note that this is one of the few places where adding () changes context - and I prefer to think of it as list-context ()x being a different operator than x. AIUI this is fixed in perl6 to actually have have different characters for the two operators.