Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: what is the scope of my $x=$x

by duff (Parson)
on Jun 05, 2006 at 14:47 UTC ( [id://553606]=note: print w/replies, xml ) Need Help??


in reply to what is the scope of my $x=$x

In perl5, you have two different $x. In perl6, both $x are the same $x. To get at a variable named $x in an outer scope you need to use the fully qualified name of the variable which would include information about whether it's a global variable (GLOBAL::<$x>, perl6 has true globals BTW), a variable in the symbol table of the current package (OUR::<$x>), or a lexical variable in the surrounding lexical scope (OUTER::<$x>).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found