in reply to Re: push undefined and vivification
in thread push undefined and vivification
Perl will only autovivify the anon. array if the value of the array element is undefined. if it has any value that would test as defined, including '' & 0, it will issue a warning.
Actually, perl will die, not issue a warning:
Can't use string (""%s"") as %s ref while ""strict refs"" in use
(F) Only hard references are allowed by "strict refs". Symbolic references are disallowed. See the perlref manpage. - perldiag
That (F) means A fatal error (trappable), i.e. die.
Programmer beware.
|
|---|