$ perl -Mwarnings -E 'my @x = qw{1 2 3}; my $y = @x[1]' Scalar value @x[1] better written as $x[1] at -e line 1.