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

Re: Referencing the locals

by hrcerq (Scribe)
on Apr 28, 2021 at 18:50 UTC ( #11131809=note: print w/replies, xml ) Need Help??


in reply to Referencing the locals

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

P.S.: Later on, I noticed scoping rules are not the key point here. Yet the reading I mentioned helps.

return on_success() or die;

Replies are listed 'Best First'.
Re^2: Referencing the locals
by haukex (Bishop) on Apr 28, 2021 at 19:21 UTC
    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

      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://11131809]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-05-23 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?