in reply to CORE::GLOBAL magic?
Looks like when you reference \&<Something>, it pre-declares a coderef/subref named <Something>$ perl -e '$x=\&fff;print $x->(2)' Undefined subroutine &main::fff called at -e line 1.
However, since the Name <Something> is declared without any content, it will complain when called.
If you happen to provide the content of the name <Something>, it works:
$ perl -e '$x=\&fff; sub fff{44};print $x->(2)' 44
Memory fault -- brain fried
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CORE::GLOBAL magic?
by Anonymous Monk on Jun 02, 2018 at 12:49 UTC | |
by LanX (Saint) on Jun 02, 2018 at 16:10 UTC |