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.
In reply to Re: reaching into a perl script from a package
by Fletch
in thread reaching into a perl script from a package
by Brad.Walker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |