Syntactic Confectionery Delight | |
PerlMonks |
Re: CORE::stat() doesn't appear to be the same as statby ikegami (Patriarch) |
on Sep 10, 2018 at 22:50 UTC ( [id://1222103]=note: print w/replies, xml ) | Need Help?? |
You get two difference addresses because you take create references to two different subs, &main::stat and &CORE::stat. First, you take the address of &main::stat. It's never defined.
Then, you take the address of &CORE::stat twice. The subs in CORE:: are automatically-generated wrappers for the operators of the same name, so you get a wrapper to the stat operator.
Well, it would be if stat had a calling convention that could be duplicated by subroutine prototypes. Instead, it's a wrapper for an error message.
In Section
Seekers of Perl Wisdom
|
|