Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: "print" of nonexistent element is actually altering a hash

by Anonymous Monk
on Feb 18, 2020 at 02:07 UTC ( #11113084=note: print w/replies, xml ) Need Help??


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!
  • Comment on Re^2: "print" of nonexistent element is actually altering a hash

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

    Mike, you do realize you could save yourself the time and hassle of posting here and both the OP and PerlMonks would be just as well off. Don't you?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11113084]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-03-31 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (177 votes). Check out past polls.

    Notices?