While
$0 is used to neat effect its associated perl5
MAGIC is not used, and I quoth from
the source
# Turn off special $0 magic
*0 = \ my $zero;
After that
$0 will loose it's magical behaviour e.g
shell> perl -MDevel::Peek -
Dump $0;
*0 = \ my $zero;
Dump $0;
^D
SV = PVMG(0x99900b0) at 0x999410c
REFCNT = 1
FLAGS = (GMG,SMG,pPOK)
IV = 0
NV = 0
PV = 0x99950e8 "-"\0
CUR = 1
LEN = 2
MAGIC = 0x99950f8
MG_VIRTUAL = &PL_vtbl_sv
MG_TYPE = PERL_MAGIC_sv(\0)
MG_OBJ = 0x9994100
MG_LEN = 1
MG_PTR = 0x9995118 "0"
SV = NULL(0x0) at 0x9997828
REFCNT = 2
FLAGS = (PADBUSY,PADMY)
Although leaving
$0 scrubbing out could certainly lead to some interesting debugging facilities in conjunction with
top ;)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.