>>>>>>>>>> package first ; sub first_one { my $package = shift ; SetMyPackage($package) ; first_two() ; } sub first_two { sub first_two {print "2\n" ; print join(':', caller()) . "\n"} ; } package second ; # import the subs as before first_one('a_completely_diffrent_package') ; <<<<<<<<<<<<<< the above would print: a_completely_diffrent_package:/home/nadim/Desktop/test.pl:4 I'm all ears, Nadim. PS. there is a practical use that I'll gladely if someone is interrested.