Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • pointer to subroutine?

    0 answers - 716 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Bryan R Harris wrote:
    : , I'll rename it to something else -- but I still want
    : it to be called "_uc" in my code and maybe just "u"
    : available to the user. Is this possible?
    Yes. You can have another sub call _uc().
    sub u {
    return _uc(@_);
    }
    Subroutines are in the Symbol Table. You could associate
    (I'm not certain that is the correct term) another name with
    this sub using a glob. You can read more about this in Symbol
    Tables section of "perlmod" file of the documentation, but it
    may rob you of some sanity. :)
    local *convert = \&_uc;
    Calling convert() will now do the same as calling _uc().
    HTH,
    Charles K. Clarkson

Re: pointer to subroutine?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 5 =
QUESTION ON "Perl"

EMSDN.COM