in reply to (cLive ;-) Re: $_ haters anonymou
in thread $_ haters anonymou
$::^M is equivalent to $main::^M - 'main' is the default namespace.Actually they're both syntax errors.
If they weren't syntax errors, then yes, the variable $::^M is identical to $main::^M. But not because main is the default namespace. It's because the empty stash name is interpreted as though you had said main instead. See line 579 of gv.c:
If the name turns out to have been empty, Perl looks up the main stash instead.if (!*name) return gv ? gv : (GV*)*hv_fetch(PL_defstash, "main::", + 6, TRUE);
--
Mark Dominus
Perl Paraphernalia
|
---|