adram has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (references)
I would like to call a built-in function (in this case, uc) via a reference.
However, the following does not work.
(I suspect I'm not using the correct namespace for built-in functions.)
I've tried UNIVERSAL::uc, CORE::uc, and CORE::GLOBAL::uc, but they all complain with something like (depending on the namespace I try to use):my %op = ( 'toupper' => \&uc, ... ); print $op{'toupper'}->($text);
Undefined subroutine &CORE::uc called at ...
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I get a reference to a builtin function?⭐
by dws (Chancellor) on Mar 21, 2001 at 04:51 UTC | |
Re: How do I construct a reference to a builtin function?
by jlawrenc (Scribe) on Mar 21, 2001 at 05:08 UTC | |
Re: How do I get a reference to a builtin function?
by ikegami (Patriarch) on Jun 15, 2009 at 15:28 UTC | |
Re: How do I get a reference to a builtin function?
by erebusx (Initiate) on Jun 15, 2009 at 15:19 UTC | |
Re: How do I get a reference to a builtin function?
by igoryonya (Pilgrim) on Dec 08, 2009 at 10:07 UTC | |
by moritz (Cardinal) on Dec 08, 2009 at 11:25 UTC |