On Thu, 28 Dec 2000, Ted Mao wrote: > I have a problem which seems simple, but I haven't found a solution to it > yet. > > Let's say I have two packages, A and B. In a subroutine of package A, I'm > trying to return a reference to a subroutine in package B. So in package A > I have: > > my $refToB = \&B->someFunction; > > But that gives me the error: "Undefined subroutine &A::someFunction." > This also doesn't work: > > my $refToB = \B->someFunction; > > That one returns a reference to B->someFunction AFTER it has been evaluated > with no arguments. So if B->someFunction() returned "0", $refToB would be a > reference to a scalar containing "0". > Why don't you use \&B::someFunction? **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users