Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: function alias

3 views
Skip to first unread message

Paul Johnson

unread,
Sep 4, 2019, 6:45:03 PM9/4/19
to Wesley Peng, begi...@perl.org
On Wed, Sep 04, 2019 at 02:17:36PM +0800, Wesley Peng via beginners wrote:
> Hello,

This is actually two different questions with two different answers:

> How to make a function alias in perl?

$ perl -E 'sub b { say 67 } *says = \&b; says(83)'
67
$

> for example, says() is alias to
> print().

This is not possible. Though it is with some core functions.

See https://perldoc.perl.org/CORE.html for details.

--
Paul Johnson - pa...@pjcj.net
0 new messages