Besides the fact that built-in functions are predefined and are part of the= language, are there any characteristic differences between them? Given b_f= ct a built-in function, and u_fct a user-defined function, are there any p= roperties that I can programmatically query to show that b_fct is built-in = function, and similarly for u_fct? This question is just a curiosity.
![]() |
0 |
![]() |
On 10/12/2016 22:33, An Luutran wrote: > Besides the fact that built-in functions are predefined and are p > #!/usr/bin/perl use feature qw/say/; sub f1 {} say TestFunctions('f1'); say TestFunctions('hex'); say TestFunctions('f2'); sub TestFunctions { __PACKAGE__->can("CORE::$_[0]") ? 'built in': __PACKAGE__->can($_[0]) ? 'user':'not exist' }
![]() |
0 |
![]() |