Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Note on usage of ours variables and a question

by AnomalousMonk (Archbishop)
on Nov 20, 2019 at 02:24 UTC ( [id://11108925]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Note on usage of ours variables and a question
in thread Note on usage of ours variables and a question

${^MYDEBUG} = 1; ... undocumented feature.

See The Syntax of Variable Names in perlvar, especially the third paragraph.


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^4: Note on usage of ours variables and a question
by likbez (Sexton) on Nov 20, 2019 at 03:20 UTC
    Looks like one needs additional underscore:
    ${^_MYDEBUG} = 1;

    "No name that begins with ^_ will acquire a special meaning in any future version of Perl; such names may therefore be used safely in programs. $^_ itself, however, is reserved."

    "In particular, the special ${^_XYZ} variables are always taken to be in package main , regardless of any package declarations presently in scope."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108925]
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: (9)
As of 2024-03-28 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found