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

Re^2: Referencing the locals

by haukex (Archbishop)
on Apr 28, 2021 at 19:21 UTC ( [id://11131814]=note: print w/replies, xml ) Need Help??


in reply to Re: Referencing the locals
in thread Referencing the locals

You'll get a better understanding of this by taking a look on Variables and Scoping tutorials, and I definitely recommend this article too.

Note that this isn't an issue of scoping, and none of those links discuss symbolic references.

$ perl -le '$x=2; my $x=4; print ${x}, ${"x"}' 42

Replies are listed 'Best First'.
Re^3: Referencing the locals
by hrcerq (Scribe) on Apr 28, 2021 at 19:31 UTC

    My bad. It's just that I saw the term local variables associated to lexical variables, and ended up focusing on that. I'm sorry.

    return on_success() or die;

      No worries, and thanks for editing your node! In the context of the question, the difference between lexical and package variables is relevant, which those tutorials do cover.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-18 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found