1nickt has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, in answering a question today I cam upon something that puzzled me. First:

$ perl -Mstrict -wle"my %hash; @hash{'array'} = 'foo';" Scalar value @hash{'array'} better written as $hash{'array'} at -e lin +e 1. $

... which is what I expected. But then:

$ perl -Mstrict -wle"my %hash; my @array; @hash{@array} = 'foo';" $

Why doesn't Perl have a warning for the latter case?

The way forward always starts with a minimal test.