Is it possible to symbolically reference a Perl CORE module?

Posted by Blaise Roth on Stack Overflow See other posts from Stack Overflow or by Blaise Roth
Published on 2010-05-31T11:55:30Z Indexed on 2010/05/31 15:13 UTC
Read the original article Hit count: 247

Filed under:
|
|
|

I know I could easily do something like

sub sin {
    sin($_[0]);
}

and symbolically reference that for every function I need to symb ref, but I'd just like to know if there's a way to do something like

{$foo}(123);

vs.

&{$foo}(123);

which works, but not for core functions.

Thanks.

© Stack Overflow or respective owner

Related posts about perl

Related posts about function