in reply to Re: "print" of nonexistent element is actually altering a hash
in thread "print" of nonexistent element is actually altering a hash
Yes, as other "Anonymous Monks" have said – a feature. Because, if you are legitimately trying to use something like $hash{'www'}{'xxx'}{'yyy'}{'zzz'}, it is "hugely convenient" that Perl will automagically create $hash{'www'} then $hash{'www'}{'xxx'} then $hash{'www'}{'xxx'}{'yyy'}, and maybe even $hash{'www'}{'xxx'}{'yyy'}{'zzz'}, all without asking. This very simple trick bypasses a lot of tedium and is "usually" beneficial. Just not in your case!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: "print" of nonexistent element is actually altering a hash
by Anonymous Monk on Feb 18, 2020 at 16:18 UTC |
In Section
Seekers of Perl Wisdom