Does this help?
{ package x; my $subref; sub set{ $subref = shift }; sub call{ $subref->( @_ ) }; };; sub test{ print "This is sub test() with args:[ @_ ]"; };; x::set( \&test );; x::call( 1, 2.0, 'three' );; This is sub test() with args:[ 1 2 three ]
In reply to Re: Is it possible to call a package::main subroutine from a module?
by BrowserUk
in thread Is it possible to call a package::main subroutine from a module?
by TorontoJim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |