package XX; sub inxx{return __PACKAGE__} package main; my $ref = \&XX::inxx; print $ref->(); __END__ XX