in reply to reaching into a perl script from a package
Code in the outer main program is in the package main (by default, presuming no other package Somethingelse declarations of course); just use something along the lines of my $main_func1 = \&main::func1;.
Update: Seconded that something like jimt's method below where the calling code specifies what the callback routine should be is a better way to do this.
|
|---|