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 (Monk) 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.