Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2018-07-20 07:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (426 votes). Check out past polls.

    Notices?