It's to permit autovivification:
use feature ":5.14"; use warnings FATAL => qw(all); use strict; use Data::Dump qw(dump pp); sub aaa($) {my ($a) = @_; $a->{a} = 1; say STDERR dump($a); } aaa({}); aaa(undef); aaa(0);
Produces:
{ a => 1 } { a => 1 } Can't use string ("0") as a HASH ref while "strict refs" in use at C:\ +Phil\Perl\PerlMonks\undef2.pm line 8.
In reply to Re: Why is "undef" after passing not readonly anymore?
by philiprbrenan
in thread Why is "undef" after passing not readonly anymore?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |