in reply to Re: Strange behaviour of interpreter when dereferencing an undefined value
in thread Strange behaviour of interpreter when dereferencing an undefined value

I can't see how this could be related to my examples since in
perl -we'use strict; sub foo {}; my $a; foo( %{ $a } )'
the expression %{ $a } isn't in lvalue context. Also autovivification doesn't appear only in lvalue context:
perl -MData::Dumper -we'use strict; my $a; $a->{b}{c}; print Dumper $a +' $VAR1 = { 'b' => {} };

Replies are listed 'Best First'.
Re^3: Strange behaviour of interpreter when dereferencing an undefined value
by ikegami (Patriarch) on Nov 04, 2014 at 03:38 UTC

    the expression %{ $a } isn't in lvalue context.

    Yes, it is.

    $ perl -E'sub f { $_[0] = 'abc' } f($x); say $x' abc $ perl -E'sub f { $_[1] = 'abc' } $h{a}=undef; f(%h); say $h{a}' abc

    Perl arguments are always passed by reference.

    Also autovivification doesn't appear only in lvalue context

    I didn't say otherwise.