in reply to Re^2: Password Program
in thread Password Program

Well, yes, it seems to be trigerred by the assignment:
$ perl -wMstrict -e 'my @foo; @foo[3] = "bar";' Scalar value @foo[3] better written as $foo[3] at -e line 2.

Je suis Charlie.

Replies are listed 'Best First'.
Re^4: Password Program
by Anonymous Monk on Mar 01, 2015 at 13:43 UTC

    Aha! perl5200delta:

    The warning "Scalar value @hash{foo} better written as $hash{foo}" now produces far fewer false positives. In particular, @hash{+function_returning_a_list} and @hash{ qw "foo bar baz" } no longer warn. The same applies to array slices. [perl #28380, #114024]

    The commit is 429a25554a6. The argument for this change was that something like this is useful:

    use warnings; use strict; my @foo; $foo[0] = "abcd"=~/b(.)/; # scalar context @foo[1] = "abcd"=~/b(.)/; # list context print "{$_}\n" for @foo; __END__ {1} {c}