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

Re^4: How Perl decides where a variable ends and text starts: Match variables in string interpolation

by LanX (Sage)
on Jul 24, 2021 at 08:31 UTC ( #11135357=note: print w/replies, xml ) Need Help??


in reply to Re^3: How Perl decides where a variable ends and text starts: Match variables in string interpolation
in thread How Perl decides where a variable ends and text starts: Match variables in string interpolation

And this only works for package variables not private ones.

FWIW there is a common use case for this "hack".

The debugger is caching the code lines of the debugged file for introspection in such a "hidden" array, to avoid name conflicts with regular vars.

Update: See https://perldoc.perl.org/perldebguts#Debugger-Internal-Variables for more.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^4: How Perl decides where a variable ends and text starts: Match variables in string interpolation

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-09-27 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?