Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: "my" declaration problem

by davies (Parson)
on Apr 25, 2017 at 11:29 UTC ( #1188835=note: print w/replies, xml ) Need Help??


in reply to "my" declaration problem

Warnings would tell you that your repeated "my" masked a previous declaration. When you use "my", a new variable is created. If several of the same name are created in the same scope, only the last to be declared is accessible. Therefore, $me is "at work" if $v_place is "work" (simplified, I know), which it isn't. Therefore $me exists but has no value, which is what you are seeing.

Regards,

John Davies

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-10-19 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (107 votes). Check out past polls.

    Notices?