Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Variable scope issue- effect of "my" on hash ref keys, values

by parv (Vicar)
on Feb 26, 2020 at 13:24 UTC ( #11113438=note: print w/replies, xml ) Need Help??


in reply to Re: Variable scope issue- effect of "my" on hash ref keys, values
in thread Behaviour of parsed XML

Ha! Right you are. I had missed the fact a spanking new variable was created inside the block (when assigning to the hash reference keys). No "extra fun" for me, it's obvious now.

I was mistakenly thinking that my operator was affecting the existence of keys, values (in that {a} element was autovivified and only [0] element was localized to the block) but not the $x created earlier outside the block. Much thanks to you both for the clue bat.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2020-10-24 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (242 votes). Check out past polls.

    Notices?