in reply to postfix incrementing of hash slice

If you just want to autovivify the hash keys without actually assigning any value, you can do that:

[0] Perl> @array = split /\s*/, 'the quick brown fox jumps over the la +zy dog';; [0] Perl> @hash{ @array } =( );; [0] Perl> print sort keys %hash;; a b c d e f g h i j k l m n o p q r s t u v w x y z

You can also do undef @hash{ @list }; which benchmarks very slightly faster.

Whether you think "people will be confused" by either of these is your own call, or that of your employer.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.