That's because it's a glob reference, not a code reference:
sub foo { "foo" } $fooref = \*foo; print *$fooref{CODE}->();
In reply to Re^3: Assigning to the CODE slot of a GLOB whose REF is held in a lexical?
by revdiablo
in thread Assigning to the CODE slot of a GLOB whose REF is held in a lexical?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |