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