in reply to Re^2: Defined test creates non-empty hash value
in thread Defined test creates non-empty hash value

> Unfortunately, when creating some sparse hashs of arrays I do rely upon autovivification

no autovivification does pretty much what you (seem to) want, observation and reading is safe, but setting vivifies.

Choroba already pointed you to autovivification

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Defined test creates non-empty hash value
by LanX (Saint) on Jun 15, 2024 at 13:48 UTC
    > no autovivification does pretty much what you

    > ... but setting vivifies.

    But I have to admit that it wasn't apparent for me at first.

    I think description and synopsis could be improved to highlight that the default of no autovivification is a DWIM and not a complete switch off.

    I leave it to the native speakers...

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery