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

invoke a subroutine indirectly via glob references

Skip to first unread message

Rainer Weikusat

Jan 4, 2022, 11:17:44 AM1/4/22
Assuming that an array element $l[0] holds a reference to a glob, the
subroutine currently associated with this glob can be invoked via

*{$l[0]}->(1, 2, 3)

with an explicit argument list or as


with the current @_.

The idea behind this is that the subroutine associated with the glob
might change in future and that the expression should then invoke the
'current' function and not the old one.

0 new messages