|
|
|
|
|
by lizmat
1947 days ago
|
|
FWIW, that was one of the things that Larry fixed in Perl 6 (now the Raku Programming Language https://raku.org #rakulang). You can bind to a non-existing hash element (even multiple levels deep) and it won't exist until you actually assign to it: my %h;
my $c := %h<a><b><c>;
say %h<a>:exists; # False
$c = 42;
say %h<a>:exists; # True
|
|