Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: "my" declaration problem

by davies (Prior)
on Apr 25, 2017 at 11:29 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1188835]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-24 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found